An. Nginx for Windows installation address:
Http://nginx.org/en/download.html
Two. Nginx Installation Address:
Http://nginx.org/en/docs/windows.html
Three. Start the installation
1. Unzip the downloaded Nginx file
NGINX directory structure: conf: Config file
HTML: The default resource file
LOG: Access log and error log
2. Open the DOS command, locate the Nginx folder and start the Nginx
If there is an error, you can check the log log in the Error.log file
3. View Nginx-initiated processes
You can see there are two processes, one is the main process, one is the worker process
4. Other Nginx commands
Nginx-s Stop Fast Shutdown process
Nginx-s quit gracefully closes the process. The difference with Nginx-s stop is that when there is a request to be processed in the process, the Execute QUIT command does not immediately abandon the processing of the request, but continues processing the requested request, then closes the process, and no longer accepts the new request. The stop command exits immediately, even if there is a request in the process and is no longer processed.
Nginx-s Reload when the configuration file is modified, executing this command restarts a new worker process and gracefully shuts down the old worker process for the purpose of hot start.
Nginx-s Reopen restart log file
5. The current nginx does not support UDP proxy, a worker thread maximum concurrent connection 1024, a worker process only one thread, this thread is asynchronous non-blocking mode to achieve high concurrency purposes. Typically, a master process is started, and the number of worker processes is equal to the number of cups cores.
Four. Test Nginx
To access http://localhost:8080/index.html, I have modified the port number of the nginx.conf file, and the location of the root directory, access to the URL is: http://localhost:8090/index.html
Configuration of nginx.conf in conf file
Nginx for Windows installation