Graphic tutorial on configuring nginx file server in windows 10 system

Graphic tutorial on configuring nginx file server in windows 10 system

Download the Windows version of Nginx from the Nginx official website:

http://nginx.org/en/download.html

insert image description here

Unzip the downloaded software package:

Notice:

The path of the decompressed package cannot contain Chinese characters, otherwise the Nginx service cannot be started.


insert image description here

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> 

insert image description here

After the service is successfully started, there will be two "nginx" processes in the task manager

insert image description here

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

insert image description here

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.

insert image description here

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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Methods and steps to build nginx file server based on docker
  • Nginx learning static file server configuration method
  • Detailed explanation of nginx configuration static file server
  • Detailed process of using nginx to build a webdav file server in Ubuntu

<<:  Solution to the long delay of MySQL database master-slave replication

>>:  Solve the problem of Syn Flooding in MySQL database

Recommend

MySQL 5.7 installation and configuration tutorial

This article shares the MySQL installation and co...

CentOS 8.0.1905 installs ZABBIX 4.4 version (verified)

Zabbix Server Environment Platform Version: ZABBI...

A brief discussion on MySQL event planning tasks

1. Check whether event is enabled show variables ...

Summary of Several Methods for Implementing Vertical Centering with CSS

In the front-end layout process, it is relatively...

How to manage multiple projects on CentOS SVN server

One demand Generally speaking, a company has mult...

How to use js to determine whether a file is utf-8 encoded

Conventional solution Use FileReader to read the ...

A Guide to Optimizing High-Performance Websites

Golden Rules of Performance: Only 10% to 20% of e...

A brief discussion on MySQL large table optimization solution

background The amount of new data in the business...

Detailed explanation of common usage of pseudo-classes before and after in CSS3

The before/after pseudo-class is equivalent to in...

MySQL partition table is classified by month

Table of contents Create a table View the databas...

Example analysis of the impact of MySQL index on sorting

This article uses examples to illustrate the impa...

React High-Order Component HOC Usage Summary

One sentence to introduce HOC What is a higher-or...

Tutorial on deploying the open source project Tcloud with Docker on CentOS8

1. Install Docker 1. I installed Centos7 in the v...

Teach you how to deploy Vue project with Docker

1.Write in front: As a lightweight virtualization...

32 Typical Column/Grid-Based Websites

If you’re looking for inspiration for columnar web...