下载 官网:https://nginx.org/en/download.html。
下载 官网: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。。id。>nginx。。name。>nginx Web Server。。description。>D:\Applications\nginx1.26.2\nginx.exe。。executable。>D:\Applications\nginx1.26.2\nginx.exe -s stop。。stopexecutable。>D:\Applications\nginx1.26.2\logs。。logpath。>roll。。logmode。>。service。>
打开命令行工具,其中执行。winsw.exe install。
,回车,提示完成安装服务。