The situation is as follows.. there are hundreds of sites their proxy nginx. Each section is connected to the file server, so was able to quickly register for all the configs at once.. To this day prescribed for various conditions, everything was fine... until he came to a location and proxy_pas.
The fact that proxy_pas requires to register the backend. In my case, for hundreds of sites written different backends in the form of IP addresses. These IP, for example, coincide with listen in the section server. If the value proxy_pas is not the same as listen, it gives a 404 for the specified location.
How is it possible to automatically determine the appropriate backend of the site..can only listen from the value of the IP can be pulled out..?
Here is the code included to each site:
location ~ ^/(wp-admin|wp-login\.php|admin|administrator) {
"limit_req" zone=wp burst=4 nodelay;
proxy_pass http://IP:81;
"proxy_redirect" http://IP/ /;
proxy_set_header Host $Host;
proxy_set_header Host $Host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
and if so?
- marilyne_Roh commented on July 8th 19 at 11:35