Mall Project did one months, think must use load balance, simple to understand the Nginx, first share the first demo, May after the launch, will continue to share a series of related knowledge.
Under the Nginx root directory, a nginx.bat batch file is used to start and close the Nginx service. If you need a nginx1.9.3, you will be given a package with a batch of files, even if you leave a mailbox.
I respectively in the IP for XXX and XXX server deployed three sites, the first server with 8040 (site1), 8041 Port (site2), the second server with the 8043 (site3) port, Load balancer server with 8088 ports. Three site home are index, the content for me is the site 1, I am site 2, I am the site 3.
Take a look at the configuration file, nginx.conf.
Adding server cluster nodes under the HTTP configuration node
Upstream Site {server xxxxx:8040; server xxxxx:8041;
Server xxxxx:8043}
Then configure the listening port in the server node under HTTP Listen to configure the port of the listener server.
Finally, save the configuration file and restart the Nginx service.
When accessed in the browser, it accesses the port of the Nginx listener server . Nginx will automatically assign us the request, without the Nginx weight is not configured, constantly refresh the page, you will see the index page of three sites constantly switching effect.
Finally share two articles
Nginx configuration file Description
Nginx+iis Load Balancing
First demo of the initial knowledge of Nginx