Re: Disable Port removing on rewrite

2016-09-16 Thread Francis Daly
On Fri, Sep 16, 2016 at 06:05:34PM +, Schütrumpf, Niklas wrote: > 16. September 2016 19:34, "Francis Daly" schrieb: Hi there, > > rewrite ^(.*[^/])$ http://$http_host$1/ permanent; > > > > This would break any clients that do not send the Host: header that you > > expect -- possibly that ma

Re: Disable Port removing on rewrite

2016-09-16 Thread Schütrumpf, Niklas
16. September 2016 19:34, "Francis Daly" schrieb: > * Since you already rewrite all requests that do not end in /; if you can > confirm that your clients send the name:port in the Host header that > they send, then you could change the rewrite destination to explicitly > include that: > > rewrite

Re: Disable Port removing on rewrite

2016-09-16 Thread Francis Daly
On Fri, Sep 16, 2016 at 02:39:04PM +, Schütrumpf, Niklas wrote: Hi there, > One NGINX Server listens on port 80, and our router routes port 8081 from > outside to port 80 locally. > On any rewrite NGINX strips the port from the URL. This is the server because > I get a connection to the ser

Disable Port removing on rewrite

2016-09-16 Thread Schütrumpf, Niklas
Hello, during the conversion of my web servers at home I ran into some problems. We are running more than one web servers at home and a few ports are open in the router for them. So the standard ports (80, 443) are blocked for other server in our network. One NGINX Server listens on port 80, and o