Because the project encounters a large number of image storage problems, although we don’t have a lot of images now ( is currently around 1T, and the expected growth rate is 1.3 times per year) , when I was thinking about how to effectively store a large number of pictures, I looked up some information and saw that someone used Nginx to build a server. For the purpose of learning, I also experienced it myself nginx The installation process under window, and cooperate with iis to build a load balancing process, the environment is as follows:
Explain it, because I I have only one computer, and in order to demonstrate the effect, I installed a virtual machine.
ComputerA:Install Nginx on this computer and also configure IIS, in order to discord Nginx of 80 Port conflict, be sure to modify it The port number, combined with the virtual machine B, is equivalent to 2servers for load balancing
virtual machineB:Simulate a server and establish IIS , the port number uses 80port.
Let’s talk about the resources that have been used during the installation process
Virtual machine resources:
:http: //www.ostools.net/apidocs/apidoc?api=nginx-zh
After downloading, unzip the file to the directory you specify. It may not necessarily be placed under C:
, I put it myself Note: I downloaded the version 2.
Then modify
Change the
3.
Enter, no Any tips, indicating that the installation is successful,Browser input
The command to close Nginx is :
4.
192.168.21.1 computer , then first configure the IIS above and create a test site www.nginxtest.com The port is 801
index.htmlpage
5.
6 The final result is:
A
area , The
The port that nginx
Browser input address: www.nginxtest.com Refresh a few more times The following
2situations will occur, and the effect of 2
day service load balancing will be achieved
refresh a few more times, this will appear alternately. You're done!
Related articles:
Detailed introduction to running and starting Nginx configuration