Home  >  Q&A  >  body text

apache - How to understand nginx reverse proxy and what is its use

doubt

一直都看到很多人说反向代理,但是这个是有什么用途,为什么要用到反向代理
怪我咯怪我咯2713 days ago632

reply all(5)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:05:07

    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

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 17:05:07

    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

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 17:05:07

    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.

    reply
    0
  • 迷茫

    迷茫2017-05-16 17:05:07

    When you want to use nodejs go and php at the same time

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 17:05:07

    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.

    reply
    0
  • Cancelreply