'Directory redirection issue with nginx set as reverse proxy
I have configured the server through Reverse Foloxy as follows:
Nginx reverse proxy(SSL Termination) - Varnish cache - Nginx web server(8080 port)
However, it has the following problems: For example, if you go to https://www.example.com/static (this is an example only, your domain is not my site), you will be redirected to http://www.example.com:8080/static/ . It is the same when accessing not only staic but also other directories. I am wondering how to do something like nginx.conf etc to solve this problem.
Solution 1:[1]
port_in_redirect off;
Nginx web server (8080 port) It was solved by adding the above setting to the corresponding server block.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | anon |
