Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx is installed under windows

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Download address http://nginx.org/en/download.html win and linux versions are downloaded here.

The win version is very convenient to use, pure green, and can be decompressed. To start, you need to CD to the nginx installation directory under the command line, and execute the following command:

Start the service: nginx.exe:start nginx.exe

Stop service: nginx-s stop

Reload configuration: nginx-s reload

However, this requires manual startup. If some operations need to restart the server, especially when multiple users are operating the server, it is inevitable to forget to start nginx. Therefore, you still need to add it to the windows service to make it more convenient to automatically:

Go to https://github.com/kohsuke/winsw to download: windows service wrapper, use this tool to add nginx to the windows service:

After downloading, copy it to the nginx root directory, rename it to the name you need, such as nginx-service.exe, and create a new xml file, which is the same as the name you renamed, such as nginx-service.xml. The content format is as follows:

NginxNginx ServiceHigh Performance Nginx Service (you can write in Chinese here) D:/nginx-1.13.5/nginx.exeD:/nginx-1.13.5/roll-pD:/nginx-1.13.5-pD:/nginx-1.13.5-s stop

Cd to the nginx installation directory under cmd, execute: nginx-service.exe install (uninstall the service using the uninstall parameter)

If the command is executed successfully, there will be an extra nginx service in the windows installation directory, such as:

When windows server 2012 executes, you will be prompted to install .net framework 3.5. use "Server Manager"-"Dashboard"-"add roles and Features"-(four "next steps") "Features"-check ".NET Framework 3.5 features" to install (installation requires restarting the server)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report