将Nginx注册为Windows服务
时间:2025-06-24 12:12:23 来源:新华社
【字体:  

第一步:下载Nginx。

下载 官网:https://nginx.org/en/download.html。

下载Windows Service Wrapper。

下载 官网:https://repo.jenkins-ci.org/artifactory/releases/com/sun/winsw/winsw/。

配置。

假设nginx解压目录:D:\Applications\WebServer\nginx-1.18.0。
将下载的winswinsw.将exe放在D的位置:\Applications\WebServer\nginx-1.18.0,然后在这条路径下创建文件winsw.xml:

注意。Nginx根目录必须解压。

在这里插入图片描述

nginx。nginx。nginx Web Server。D:\Applications\nginx1.26.2\nginx.exe。D:\Applications\nginx1.26.2\nginx.exe -s stop。D:\Applications\nginx1.26.2\logs。roll。

运行。

打开命令行工具,其中执行。winsw.exe install。,回车,提示完成安装服务。

[责任编辑:百度一下]
检察日报数字报 | 正义网 |
Copyrights©最高人民检察院 All Rights Reserved.