Answer the question
In order to leave comments, you need to log in
How to redirect a subdomain to a local server in nginx by ip?
You need to redirect the subdomain to the server in the local network in nginx.
Tried:
server {
listen 80;
server_name test.example.com www.test.example.com;
location / {
proxy_pass http://10.0.0.9:80;
proxy_set_header Host internal.example.com.local;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header If-Modified-Since $http_if_modified_since;
}
}
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