Configure Nginx in Windows environment
Operating system: Windows Server 2008 R2 Standard
Virtual machine: VMware Workstation
Task: configure the Nginx environment
Nginx currently provides both Linux and Windows versions, but the current Windows version is not commonly used in production environments.
Procedure:
1. Download the Nginx Windows version
Https://nginx.org/en/download.html
Https://nginx.org/download/nginx-1.14.2.zip
two。 Decompress
3. Start and stop the Nginx service
Double-click nginx.exe to start the program
Or C:\ Program Files\ nginx-1.14.2 > nginx.exe
C:\ Program Files\ nginx-1.14.2 > nginx.exe-s stop / / stop nginx
C:\ Program Files\ nginx-1.14.2 > nginx- s reload / / reload the configuration file
4. The use of two commands
Use cmd command line tool to execute tasklist command to view the process
Use the netstat-ano command to view the usage of the current port