Nginx installation tutorial and practical operation

Nginx ("engine x") is a high-performance free and open source web and reverse proxy server developed by Russian programmer Igor Sysoev, as well as an IMAP/POP3/SMTP proxy server. In the case of high concurrent access, Nginx is a good alternative to Apache server.

Nginx download address: http://nginx.org/

Step 1: Download from Nginx official website

 

Step 2: Install in the downloaded decompressed file, decompress the downloaded file, and decompress the decompressed file to a non-system disk

        Nginx.exe is the startup tool for Nginx

        The configuration file of Nginx is in the conf directory

        The logs directory stores Nginx log files

 Step 3: Click to start nginx.exe, a flashing window appears, which is normal, indicating that the nginx server has been started

 Step 4: Verify in the browser, and then the following information appears in the browser, indicating that nginx was successfully started

http://localhost:80 or http://localhost

 Step 5: Configure and modify the port number, nginx.conf in the conf directory, the default configured port for nginx to listen to is 80, if you need to modify other port numbers, you can modify it

 Step 6: After modifying the port number, you can restart nginx, just execute the command nginx -s reload to make the changes take effect

 Step 7: Create a new directory under the nginx directory (the current directory is: webapps), in which you can place pictures or web pages. Then in the nginx.conf configuration file, root modifies the relative path to webapps

 

 

 

 Step 8: Execute the command nginx -s reload to make the modification take effect, and then enter the access address in the browser address bar:

http://localhost + port number

 

 

To close nginx, enter the command: nginx -s stop (quick stop nginx) or nginx -s quit (complete and orderly stop nginx)

Use taskkill: taskkill /f /t /im nginx.exe

Guess you like

Origin blog.csdn.net/admins_/article/details/122899689