Server Configuration - How does nginx proxy to a file?
为情所困
为情所困 2017-05-16 17:09:13
0
1
547

Now there is a proxy server, and I want to access api.php in the root directory of the intranet web machine through proxy. How should I configure proxy forwarding?
I wrote it like this, but it didn’t seem to work. I added an api.html

to the root directory of the proxy server.

location ~ /api.html {
proxy_pass http://192.168.10.2:80/api.php;
}

Please give me some advice!

为情所困
为情所困

reply all(1)
phpcn_u1582

Try
rewrite api.html http://192.168.10.2:80/api.php permanent;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template