It’s hard to say what the use of nginx anti-proxy is
But I have used it, let me tell you about my application scenario
My previous website was all built with PHP, and I always had no problems using nginx as the server
Later, I came into contact with the Go language and wrote a set of web programs in the Go language, but a problem arose. nginx needs to monitor port 80, and the go language also needs to monitor port 80
At this time, nginx anti-proxy comes in handy. You can use nginx to monitor port 80 unchanged, and let go language monitor another port, such as 8080,
Then when configuring nginx virtual web, anti-proxy the program written in go language to 127.0.0.1:8080
In this way, the two can be used together without conflict. If you want to watch a video tutorial, you can go to v8 video. However, there seems to be no nginx video tutorial there yet. If you are willing, you can contribute it to everyone
Reverse proxy can hide your server in the LAN to provide services. Generally, the reverse proxy server only opens the corresponding web port to provide services. Actual business servers often need to open many management ports and database ports. Using a reverse proxy can also achieve load balancing of multiple business servers, cache resources, reduce the pressure on business servers, and initially intercept malicious requests from users.
Of course, implementing reverse proxy is not only possible with nginx.
It’s hard to say what the use of nginx anti-proxy is
But I have used it, let me tell you about my application scenario
My previous website was all built with PHP, and I always had no problems using nginx as the server
Later, I came into contact with the Go language and wrote a set of web programs in the Go language, but a problem arose. nginx needs to monitor port 80, and the go language also needs to monitor port 80
At this time, nginx anti-proxy comes in handy. You can use nginx to monitor port 80 unchanged, and let go language monitor another port, such as 8080,
Then when configuring nginx virtual web, anti-proxy the program written in go language to 127.0.0.1:8080
In this way, the two can be used together without conflict. If you want to watch a video tutorial, you can go to v8 video. However, there seems to be no nginx video tutorial there yet. If you are willing, you can contribute it to everyone
The usage mentioned by the first two is good.
However, when it comes to concepts, probably no one can explain it more clearly than the guy below.
Difference between proxy server and reverse proxy server
http://stackoverflow.com/questions/224664/difference-between-proxy-server-and-reverse-proxy-server
Reverse proxy can hide your server in the LAN to provide services. Generally, the reverse proxy server only opens the corresponding web port to provide services. Actual business servers often need to open many management ports and database ports. Using a reverse proxy can also achieve load balancing of multiple business servers, cache resources, reduce the pressure on business servers, and initially intercept malicious requests from users.
Of course, implementing reverse proxy is not only possible with nginx.
When you want to use nodejs go and php at the same time
It’s so anti-human. It’s the first time you ask a question, and you still have to review it for an hour? shit.