Answer the question
In order to leave comments, you need to log in
How to make a redirect in NGINX without changing the URI?
Salute comrades!
we have a simple configuration:
server {
listen 443 ssl;
server_name hostname.lan;
proxy_set_header Host hostname.lan;
location / {
proxy_pass http://172.16.18.50/;
}
location /a/ {
proxy_pass http://172.16.18.50/mwiki/;
#proxy_redirect http://172.16.18.50/mwiki/ /a/;
#proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question