How to install nginx on win10

How to install nginx on win10

Because the company asked me to build a WebService server for the Ford project based on nginx to implement the load, I started to use nginx. Here I will share the installation of nginx

My local environment: win10-64 bit.

1. Download the corresponding installation package from the nginx official website, http://nginx.org/en/download.html;

Download and decompress it, and put the decompressed files in the directory of your choice. My decompressed files are placed in the root directory of drive D, as shown below:

Enter the cmd window of the window, enter the command as shown in the figure below, enter the nginx directory (D:/nginx-1.8.1), and use "start nginx.exe" to install nginx, as shown in the figure below:

After successful installation, you will see the "nginx.exe" process in the "Task Manager", as shown in the following figure:

Enter 127.0.0.1 in the browser address bar, and you will see the nginx welcome interface as shown below

If you find that there is no process, it means that your installation failed. You can check the error in the logs folder in your D:\nginx-1.8.1 directory. If you find that it says:

This means that your port 80 is occupied, or you can enter the DOS system and execute the following command: netstat -aon | findstr :80 to check whether port 80 is occupied. If so, you need to modify the registry as follows:

1. Open the registry: regedit

2. Find: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP

3. Find a REG_DWORD type item Start and change it to 0

4. Restart the system, the System process will not occupy port 80

At this point, you can execute

Corresponding command: start nginx.exe command.

nginx.exe -s stop //Stop nginx

nginx.exe -s reload //Reload nginx

nginx.exe -s quit //Exit nginx

Note: In the above commands, .exe can be removed

The operation of the corresponding command is shown in the figure below:

2. nginx configuration file The nginx configuration file is nginx.conf. The corresponding operations are shown in the figure below:

Nginx configuration file analysis: https://www.jb51.net/article/103968.htm

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Install and configure IIS + MySQL + nginx + php7.1.7 under Win10
  • How to install Nginx in Docker
  • How to install Nginx in a specified location in Centos system
  • Nginx installation error solution
  • How to install php7 + nginx environment under centos6.6
  • Nginx installation detailed tutorial
  • How to install PHP7.4 and Nginx on Centos
  • Detailed tutorial for installing nginx on centos8 (picture and text)
  • Detailed explanation of nginx installation, deployment and usage on Linux
  • Correct steps to install Nginx in Linux
  • The process of installing and configuring nginx in win10

<<:  Using better-scroll component in Vue to realize horizontal scrolling function

>>:  Mysql dynamically updates the database script example explanation

Recommend

Detailed steps and problem solving methods for installing MySQL 8.0.19 on Linux

I recently bought a Tencent Cloud server and buil...

W3C Tutorial (8): W3C XML Schema Activities

XML Schema is an XML-based alternative to DTD. XM...

How to add Lua module to Nginx

Install lua wget http://luajit.org/download/LuaJI...

Understanding and solutions of 1px line in mobile development

Reasons why the 1px line becomes thicker When wor...

How to find the my.ini configuration file in MySQL 5.6 under Windows

Make a note so you can come back and check it lat...

Ubuntu basic settings: installation and use of openssh-server

Record the installation and use of openssh-server...

Solution to MySQL error code 1862 your password has expired

The blogger hasn't used MySQL for a month or ...

How to Set Shortcut Icons in Linux

Preface Creating shortcuts in Linux can open appl...

A brief discussion on the difference between src and href in HTML

Simply put, src means "I want to load this r...

A bug fix for Tomcat's automatic shutdown

Preface Recently, a Java EE web project that has ...

Use pure CSS to achieve scroll shadow effect

To get straight to the point, there is a very com...

MySQL uninstall and install graphic tutorial under Linux

This is my first time writing a blog. I have been...

Detailed explanation of how to install PHP7 on Linux

How to install PHP7 on Linux? 1. Install dependen...