nginx redirecting to wrong port

Roxis roxis at list.ru
Fri Apr 4 17:39:34 MSD 2008


On Friday 04 April 2008, Jodok Batlogg wrote:
> nginx runs behind a big-ip loadbalancer. the load-balancer accepts
> connections on port 80, but connects to nginx on port 8080.
> whenever i request a directory without trailing slash, nginx redirects
> to the directory with slash, but on the wrong port.
>
> http://www.mysite.com/directory -> http://www.mysite.com:8080/directory.
>
> any idea how to tell nginx, that the port is 80?

http://wiki.codemongers.com/NginxHttpCoreModule#port_in_redirect

syntax: port_in_redirect [ on|off ] 
default: port_in_redirect on 
context: http, server, location

Directive allows or prevents port indication in redirects handled by nginx.





More information about the nginx mailing list