Home  >  Q&A  >  body text

Can nginx provide a proxy for other machines? nginx is not installed on other machines

Assuming there are 3 Alibaba Cloud machines, can I install nginx on only one of them to provide http services for the other two without nginx?

为情所困为情所困2714 days ago480

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-16 17:09:58

    Yes
    Our company's production environment is an nginx cluster (3 nginx) and a php cluster (5 machines). nginx and php do not need to be deployed in the same environment.

    By configuring upstream, the dynamic request is forwarded to php for processing, and then returned to nginx and then returned to the client. If you take a look at nginx’s official configuration of PHP, it’s all in this mode.

    But if there is static content in the project, the corresponding code needs to be deployed on the nginx machine (php is not required)

    reply
    0
  • Cancelreply