Working with Nginx
All command have to run at nginx.exe folder. An example of nginx.conf See demo server configuration in nginx.conf Set auto-startup with WinSW.exe Windows 可以通过手动修改注册表设置启动项,感觉有些麻烦,还是找个工具。找到工具 WinSW ,它可以将任何应用包裹并作为一个 Windows 服务管理。 WinSW 作为一个全局工具使用: 下载 WinSW.exe 或 WinSW.zip 。 新建 myapp.xml 运行 winsw install myapp.xml [options] 安装服务。 运行 winsw start myapp.xml 开启服务。 运行 winsw status myapp.xml 检查服务是否启动和运行。 拷贝WinSW.exe到Nginx文件夹 新建WinSW.xml文件,并加入以上配置 管理员运行WinSW.exe将服务加入services.msc中