网上有很多关于在windows server系统下安装Ngnix,并设置为win服务的教程,经过实践,发现了一种相对更完美的方法,记录如下:
1.进入http://nginx.org/en/docs/windows.html,下载Nginx windows版。本文使用的是1.13.5版。
2.进入https://github.com/kohsuke/winsw,下载winsw,用于将Ngnix安装为windows服务。本文使用的是winsw-v2.1.2 net4版,需要先安装.Net Frameworks 4.0。
3.下载sample-minimal.xml(见上图),内容修改如下:
<configuration>
<!-- ID of the service. It should be unique accross the Windows system-->
<id>Nginx</id>
<!-- Display name of the service -->
<name>Nginx Service (powered by WinSW)</name>
<!-- Service description -->
<description>This service is a service cratead from a minimal configuration</description>
<!-- Path to the executable, whic

本文详细介绍了在Windows Server 2012 R2上安装Nginx并使用winsw将其设置为Windows服务的步骤,包括下载相应版本的Nginx和winsw,配置XML文件,以及通过命令行安装和管理服务。
最低0.47元/天 解锁文章
1327

被折叠的 条评论
为什么被折叠?



