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

The best way to start a jar package project under Centos7 server

Preface Everyone knows how to run a jar package o...

Three JavaScript methods to solve the Joseph ring problem

Table of contents Overview Problem Description Ci...

Detailed introduction to CSS priority knowledge

Before talking about CSS priority, we need to und...

React concurrent function experience (front-end concurrent mode)

React is an open-source JavaScript library used b...

What you need to understand about MySQL locks

1. Introduction MySQL locks can be divided into g...

A good way to improve your design skills

So-called talent (left brain and right brain) Tha...

CentOS 7 installation and configuration tutorial under VMware10

If Ubuntu is the most popular Linux operating sys...

64-bit CentOs7 source code installation mysql-5.6.35 process sharing

First install the dependent packages to avoid pro...

How to add a pop-up bottom action button for element-ui's Select and Cascader

As shown in the figure below, it is a common desi...

MySQL sorting using index scan

Table of contents Install sakila Index Scan Sort ...

Example of implementing the skeleton screen of WeChat applet

Table of contents What is a skeleton screen How t...