Nginx server configuration reverse proxy and load balancing
nginxReverse proxy load: Environment: There is 1 nginx on the front end as a reverse proxy server (install nginx (listening to port 8080) and apache (listening to port 80)); there are 2 apaches behind it as application servers (listening to port 80) 1. Nginx is used as a reverse proxy server, placed in front of the two Apaches, as the entrance for user access; Nginx only handles static pages, and all dynamic pages (php requests) are delivered to the two apaches in the background for processing. That is to say, we can place the static pages or files of our website in the nginx directory; dynamic pages and database access are reserved on the apache server in the background. 2. There are two methods to achieve load balancing of server cluster. the We assume that the front-end nginx (127.0.0.1:80) only contains a static page index.html; There are two apache servers in the background (localhost:80 and 119.168.136.2:80 respectively), one root directory places the phpMyAdmin folder and test.php (the test code inside is print “server1”;), another root directory only places a test.php (the test code inside is print “server2”;). 1). The simplest example of using nginx as a reverse proxy server; when…