This is the first day of my participation in the Gwen Challenge in November. Check out the details: The last Gwen Challenge in 2021

Nginx Installation Tutorial (Windows)

1. Download from the official website

Link to: nginx.org/en/download…

The version I downloaded is:Nginx/Windows – 1.18.0  pgp

Download it and decompress it to the local PC

2. Installation and deployment

Do not double-click nginx.exe directly, must be started in the DOS window, do not directly double-click nginx.exe, this will lead to modify the configuration after restart, stop nginx invalid, need to manually shut down the task manager in all nginx processes. You have to restart it.

(2). Start the nginx service

 

(3). Open the Task Manager (Ctrl+ Shift +ESC) to check whether the task process exists

Then open your browser and access the domain name and port http://localhost:80 or 127.0.0.1:80 (default :80). If the welcome page appears, the deployment is successful!

(4). Modify the content displayed in the browser

Find the HTML folder in the nginx folder, go inside the HTML folder, replace the web files inside with your own web files, and type http://localhost:80 or 127.0.0.1:80 again

3. Common mistakes:

(1) The port number is occupied

The error message is as follows:

Solutions:

Go to the conf folder in the nginx directory and go to the nginx.conf file. Open it with Notepad, change port 80 to another port number and save it, such as 81

If I have just changed port 80 to port 81, I can type http://localhost:81 or 127.0.0.1:81 in the browser address bar

(2) Nginx folder path contains Chinese

summary

If this article has helped you, remember that one button three concave ~