Proxy (nginx->nginx) issue

Cliff Wells cliff at develix.com
Sun Jun 14 03:26:48 MSD 2009


Please disregard.   A week of migrating servers has clearly left me
brain dead.   

The issue was on the new server I was using include/sites/*.conf and
named a file without the .conf extension =(   Once I'd fixed that and
added proxy_set_header Host $host it all works fine.

Cliff

On Sat, 2009-06-13 at 15:53 -0700, Cliff Wells wrote:
> Hi,
> 
> I'm migrating an old shared hosting box into a VPS and I was hoping to
> migrate one site at a time by just proxying from the old server to the
> new one (both servers running Nginx):
> 
> hosting (1.2.3.4):
> ====================
> server {
>     server_name     www.domain1.com;
>     listen          1.2.3.4:80;
>     location / {
>         proxy_pass http://5.6.7.8; 
>     }
> }
> 
> server {
>     server_name     www.domain2.com;
>     listen          1.2.3.4:80;
>     location / {
>         proxy_pass http://5.6.7.8; 
>     }
> }
> 
> 
> VPS (5.6.7.8):
> ===================
> server {
>     server_name     www.domain1.com;
>     listen          80;
> 
>     location / {
>         root    /var/www/domain1.com;
>         index   index.html;
>     }
> }
> 
> server {
>     server_name     www.domain2.com;
>     listen          80;
> 
>     location / {
>         root    /var/www/domain2.com;
>         index   index.html;
>     }
> }
> 
> 
> But what happens is all requests end up serving domain1.com.
> 
> What am I missing?  When I look in the log for domain1, I see similar to
> this for all requests:
> 
> 1.2.3.4 - - [14/Jun/2009:02:50:46 +0400] "GET /file.gif HTTP/1.0" 304 0
> "http://www.domain2.com/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.0.11) Gecko/2009060309 Ubuntu/9.04 (jaunty) Firefox/3.0.11"
> 
> 
> Regards,
> Cliff
> 
-- 
http://www.google.com/search?q=vonage+sucks






More information about the nginx mailing list