Download the Windows version of Nginx from the Nginx official website: http://nginx.org/en/download.html Unzip the downloaded software package: Notice: The path of the decompressed package cannot contain Chinese characters, otherwise the Nginx service cannot be started. Start the Nginx service: "Windows key + R key" to open the run, enter "cmd" to enter the "Dos terminal" C:\Users\Administrator>f: F:\>cd GX\nginx-1.16.1 # Start command F:\GX\nginx-1.16.1>start nginx F:\GX\nginx-1.16.1> After the service is successfully started, there will be two "nginx" processes in the task manager Modify the configuration file and restart Nginx Add the following lines above the "HTTPS server block" in the "nginx.conf" file # Add file manager # Display directory autoindex on; # Display file size autoindex_exact_size on; # Display file time autoindex_localtime on; server { listen 8888; server_name localhost ; # Local file path # Note that you cannot use the entire logical disk F:\ as the directory path directly. You need to use F:\ English directory name root F:\GX\Chiron; } Reload Nginx Service # Reload the Nginx service command F:\GX\nginx-1.16.1>nginx.exe -s reload F:\GX\nginx-1.16.1> Web browser access verification: Here I have created a "test.txt" file in the "F:\GX\Chiron" directory for testing. Access address: http://ip:port Notice: 1. The directory name and file name must use English characters to download normally; 2. Files with Chinese characters may display garbled characters, and when downloading, a "500 Internal Server Error" error may be reported. Related commands for Windows version of Nginx: nginx -s stop //Stop nginx nginx -s reload //Reload nginx nginx -s quit //Exit nginx start nginx //Start nginx Set the PC to start automatically at startup C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup and create a shortcut for "nginx.exe" in the above directory. Summarize The above is what I introduced to you about configuring nginx file server on Windows 10 system. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Solution to the long delay of MySQL database master-slave replication
>>: Solve the problem of Syn Flooding in MySQL database
Preface The mysql module (project address is http...
challenge: Converts the characters &, <, &...
Table of contents 1. Background 2. What is silent...
Table of contents Typical waterfall website Water...
This article shares the specific code of JavaScri...
SVN service backup steps 1. Prepare the source se...
Table of contents Case scenario Solving the probl...
/******************** * Character device driver**...
Uninstall the system-provided MySQL 1. Check whet...
This article shares the specific code of jQuery t...
Table of contents 1. Introduce according to the o...
Preface The MySQL permission table is loaded into...
The warning points in this article have nothing t...
Table of contents Preface 1. Custom focus command...
To do MySQL performance adjustment and service st...