Answer the question
In order to leave comments, you need to log in
How to properly proxy the site through proxy_pass in nginx and not catch a redirect?
Hey guys.
The problem is that when you open the page:
https://local-domen
It redirects to:
https://super-secret-store.com
And I would not want to redirect from my domain.
How can this be prevented?
There is such a config.
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name local-domen;
include snippets/snakeoil.conf;
location / {
sub_filter_once off;
sub_filter_types *;
proxy_pass https://super-secret-store.com;
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