Fix Nginx redirects to url:port when accessing url without slash
When accessing http://example.com/somefolder, you might get http://example.com:8080/somefolder (8080 is the port you are listening) instead, since your are missing a slash in the end. One may use rewrite to deal with it. However, a simple build-in solution is port_in_redirect off
. An example is as follow:
1 |
|