Answer the question
In order to leave comments, you need to log in
NGINX proxying all requests for all domains to another NGINX, how?
How can and is it possible to implement such a scheme, there is an old server on it with many domains, we want to move to a new one, we need to proxy all requests for all domains to the new server until the domain zone switches to the new server, how can this be implemented? There are virtual hosts that are easy to configure, there are complex ones, is it possible to do this somehow without registering in each proxy_pass?
Thanks
Answer the question
In order to leave comments, you need to log in
On the old server, delete all virtual hosts. Create one in which to specify server_name _ ; And the required proxy_pass . That's all. Any domain name will be forwarded to proxy_pass.
well, it's that simple)
location / {
proxy_pass http://111.111.111.111;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question