o(╥﹏╥)oSad

WeChat cannot downloadNginx, but just click on the upper right corner and select open in browser or Safari!
Nginx

Nginx

  • Size: 1.3M
  • Language: English
  • category: Server class
  • System: Win All

Recommended for you: Nginx log analysis tool

Nginx ("engine x") is a high-performance HTTP and IMAP/POP3/SMTP. Nginx was developed by Igor Sysoev for Russia's second most visited Rambler.ru site, where it has been running for more than four years. Igor releases the source code under a BSD-like license. In the four years since its release, Nginx has become known for its stability, rich feature set, sample configuration files, and low system resource consumption. At present, Nginx has been deployed on major domestic portal websites, such as Sina, NetEase, Tencent, etc.; Nginx has also been deployed on several important domestic video sharing websites, such as Liufangfang, Ku6, etc. It has recently been discovered that Nginx technology is becoming increasingly popular in the country, and more and more websites are beginning to deploy Nginx.

Nginx solves the C10K problem of the server (that is, the number of clients connected within one second is 10k or 10,000). The design of Nginx does not use threads to process requests like traditional servers, but a more advanced mechanism-event-driven mechanism, which is an asynchronous event-driven structure.

Although Nginx currently accounts for only a small part of the market, its high performance and low memory consumption structure make it more and more common. A typical application is that we can use Nginx as a reverse proxy to load balance the website. device. For example: WordPress, GitHub and other well-known websites all use Nginx.

Features of Nginx

Ø Cross-platform: can be compiled and run on most Unix like systems. There is also a ported version for Windows.​

Ø The configuration is extremely simple: very simple and easy to use.​

Ø Non-blocking, high-concurrency connection: When data is copied, the first stage of disk I/O is non-blocking. The official test can support 50,000 concurrent connections, and in actual production, it can run 20,000 to 30,000 concurrent connections (thanks to Nginx adopting the latest epoll event processing model (message queue).

Ø There is no need for a long connection between the Nginx proxy and the back-end web server;

Ø Nginx receives user requests asynchronously, that is, it first receives all user requests and then sends them to the back-end Web server at once, which greatly reduces the pressure on the back-end Web server.​

Ø When sending a response message, it receives data from the back-end web server and sends it to the client.​

Ø The network dependency is low. In theory, load balancing can be implemented as long as the ping can be passed, and the internal network and external network traffic can be effectively distinguished.​

Ø Support built-in server detection. Nginx can detect whether the server fails based on the status code and timeout information returned by the application server when processing the page, and promptly returns the incorrect request and resubmits it to other nodes.​

Ø Adopt Master/worker multi-process working mode

Ø In addition, it has the characteristics of small memory consumption, low cost (much cheaper than F5 hardware load balancer), bandwidth saving, and high stability.

Basic functions of Nginx

The functions of Nginx include basic HTTP functions and extended functions. Like the Apache server, the Nginx server is designed to provide more functions and can effectively extend these functions. Each module provides a function, and function expansion can be achieved by compiling these function modules.

1. Basic HTTP functions

a) Provide static files and index files, process static files, index files and automatic indexing, and open file descriptor cache;

b) Use cache-accelerated reverse proxy, reverse proxy acceleration (no cache), simple load balancing and fault tolerance;

c) Use caching mechanism to accelerate remote FastCGI, simple load balancing and fault tolerance;

d) Modular structure. Filters include gzipping, byte ranges, chunked responses, and SSI-filter. In the SSI filter, multiple sub-requests to the same proxy or FastCGI are processed concurrently;

e) Support SSL and TLS SNI support;

f) IMAP/POP3 proxy function;

g) Use an external HTTP authentication server to redirect users to the IMAP/POP3 backend;

h) Use an external HTTP authentication server to authenticate the user and redirect the connection to the internal SMTP backend;

2. Other HTTP functions

a) Name-based and IP-based virtual servers;

b) Support Keep-alive and pipeline connections;

c) Flexible configuration and reconfiguration, and online upgrade without interrupting customer access processing;

d) Access log format, cache log writing and fast log rotation;

e) 3xx-5xx error code redirection;

f) Speed ​​limit

 

Basic modules of Nginx

The core modules of Nginx include kernel modules and event-driven modules, namely: CoreModule and EventsModule; there is also a third-party module HTTP kernel module, HttpCoreModule, which is the core module of the Nginx server.

CoreModule and EventsModule modules have fewer configurations than HttpCoreModule, but their configuration will affect system performance rather than functional differences.

1. CoreModule is used to control the basic functions of the Nginx server;

2. EventsModule is used to control how Nginx handles connections. Some parameters of the instructions of this module will have an important impact on the performance of the application system;

3. HttpCoreModule provides HTTP access to the Nginx server. This module is indispensable.

 

Nginx configuration installation environment

1.yum -y install gcc* epel-release curl curl-devel mcrypt openssl openssl-devel gd gd-devel freetype freetype-devel zlib zlib-devel zip libmcrypt-devel libmcrypt pcre-devel libevent-devel ncurses-devel libxml2* mcrypt* libmcrypt* cmake gcc* lrzsz ntp telnet

2.Create user

useradd -s /sbin/nologin web

3. Create the nginx installation directory (this step can be omitted)

mkdir -p /usr/local/nginx

chown -r web:web /usr/local/nginx

4. Download and install the software installation package from Huajun Software Park (softwaredownload4.com/)

5. Copy the downloaded software package to the /usr/src/ directory

6. Unzip the Nginx installation package

tar -zxf /usr/src/tengine-2.1.2.tar.gz

cd /usr/local/tengine-2.1.2/

7. Carry out testing

./configure --prefix=/usr/local/nginx --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre

8.Compile

make

9.Installation

make install

10. Start nginx /usr/local/nginx/sbin/nginx

 

Version: 1.9.10 for Windows Stable versions | Update time: 2024-04-03

Similar recommendations

Latest updates

Nginx review

  • 1st floor Huajun netizen 2011-03-23 ​​18:22:35
    The Nginx interface design is easy to use and has rich functions. I highly recommend it!
  • 2nd floor Huajun netizen 2020-01-17 10:29:12
    Nginx is awesome! 100 million likes! ! !
  • 3rd floor Huajun netizen 2019-08-21 09:54:14
    The overall feeling of Nginx is good and I am quite satisfied with it. The installation and operation are very smooth! Followed the installation step-by-step instructions and it went very smoothly!

Recommended products

Everyonealso likeThese:

+

This application has not passed real-name authentication. You can download it through the mobile assistant.

CancelOK