Answer the question
In order to leave comments, you need to log in
How to display url when browsing subdomain on nginx?
There is a server with nginx.
I have a website address https://domain.com/path/ I want to display information from the URL https://domain.com/path/
when browsing the subdomain.domain.com subdomain . All these paths, subdomains on one site.
There is such a config:
location / {
proxy_pass https://domain.com/path$request_uri;
}
Answer the question
In order to leave comments, you need to log in
It should just work like this:
location / {
proxy_pass https://domain.com/path/;
}
It seems you are not using the directive correctly: nginx.org/ru/docs/http/ngx_http_proxy_module.html#...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question