Nginx is a server software, so its most important, the most basic function of course, can be combined with the server hardware, so that programmers can put the program on the Nginx server, the program published, so that thousands of netizens can browse. In addition, Nginx is a high-performance HTTP and reverse proxy server, but also a proxy mail server. In other words, we can publish the Web site Nginx, can also achieve load balancing function, but also as a mail server to send and receive mail and other functions. The so-called load balancing is that when there are more than n users accessing our server, in order to reduce the server pressure, we need to introduce users to each server, to share the pressure of the server.
The first is that the Iis,iis server can only run on Windows, and Windows Server performance is not as good as a Linux server. Second, the TOMCAT,TOMCAT server is for the Java language, is a heavy-duty server, and Nginx is a lightweight server, Tomcat and Nginx are not comparable. Finally, let's say that Apache,apache has many advantages, such as stability, open source, cross-platform, and so on, but Apache does not support high concurrency. Nginx can support TCP connection processing millions, more than 100,000 concurrent connections, and is a good cross-platform server.
The main advantages of nginx can be high concurrency, simple deployment, less memory consumption, low cost and so on;
Nginx's main shortcomings have rewrite function is not strong enough, the module does not have more Apache.
In the Linux operating system to build the Nginx server, many times there will be different errors, in this, we set up the process of errors in some of the summary. There are these types: firewall issues, missing gc++, missing Pcre (the name is libpcre3 in Ubuntu), Zlib (zlib1g in Ubuntu), and so on.
1, download Nginx, 2, (Root) $./configure 3, make 4, make install
sudo apt-get install libpcre3 Libpcre3-dev
sudo apt-get install zlib1g Zlib1g-dev
Nginx Environment Building (Linux based)