Answer the question
In order to leave comments, you need to log in
Nginx in reverse proxy mode for hosting (on a server with virtual hosts)?
Help me set up nginx in reverse proxy mode on a server with virtual hosts
. The essence of this part of the site is hanging on an external hosting webflow.io to see your page, you need to configure cname on dns on proxy-ssl.webflow.com and then my page www.subdomen is spinning on my subdomain .domen.ru
But we need this page to be part of our monolith in the form of domen.ru/subdomen
To correctly transfer the domain name, there is a proxy_set_header Host parameter that replaces the host and in the response and as a result the browser goes to the domain www.subdomen.domen.ru but does not remain domen.ru/subdomen
My setting
location /subdomen {
proxy_pass https://www.subdomen.domen.ru ;
proxy_set_header Host www.subdomen.domen.ru;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_header Referer;
}
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