for example:
There is currently an HTTP proxy server A (10.0.0.1/24, 192.168.0.1/24
) and a Web server B (192.168.0.2/24
).
Machine C (10.0.0.3/24
) can access the website on B by setting A as a proxy.
C machine has a public IP. Now you only have permission to make adjustments to C. How to configure nginx installed on C so that it can reverse proxy website B...
我想大声告诉你2017-05-16 17:26:41
Since C and B are not on the same network segment, we can only use A, which is the secondary proxy you mentioned. Since you have implemented A proxy for B, you can set it up in the same wayClient<===>C<===>A<===>B
I wrote it down briefly:
nginx for C
upstream A{
server 10.0.0.1:80;
}
server {
listen 80;
server_name www.xxxx.com;
location / {
proxy_pass http://A;
}
}
A’s nginx
upstream B{
server 192.168.0.2:80;
}
server {
listen 80;
location / {
proxy_pass http://B;
}
}
That’s probably it, but I think you may have other needs