nginx redirecting to wrong port

Igor Sysoev is at rambler-co.ru
Tue May 27 17:04:25 MSD 2008


On Tue, May 27, 2008 at 01:29:23PM +0200, Dusan Turko wrote:

> > You may either fix Apache configuration or set in nginx:
> > 
> > -          proxy_redirect     off;
> > +          proxy_redirect     http://www.mysite.com:8080/  /;
> 
> Thanks for your reply
> 
> 1.)It helped just when I type http://www.mysite.com/test it shows a 
> blank site (page does not exist) instead of redirect to 
> http://www.mysite.com/test/

Could you create debug log of this request ?

> 2.) I use more virtual hosts on the server so I tryed to set up
> proxy_redirect     *:8080/  /;
> and it does not work.

nginx does not support variables in left part of proxy_redirect, therefore
you should configure Apache.

> Any idea how to set it up in apache?

Look
http://httpd.apache.org/docs/1.3/mod/core.html#usecanonicalname
http://httpd.apache.org/docs/1.3/mod/core.html#port

Try to set
UseCanonicalName  on

and replace
Port 8080
with
Listen 8080


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list