S
S
speedvm2021-11-17 15:43:41
Nginx
speedvm, 2021-11-17 15:43:41

How to proxy requests in Nginx for the site root and everything else?

Hi all!
Nginx proxies all domain.com requests to an internal server:

location / {
        proxy_pass  http://10.0.0.11;
        include proxy_params;
   }


It is necessary to leave proxying requests of the domain.com type to the server 10.0.0.11. And proxy domain.com/... requests to another internal server (10.0.0.12).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2021-11-17
@speedvm

One location for the root
location =/
Second for the rest
location /

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question