nginx配置为windows服务中的坑

时间:2023-03-09 15:56:42
nginx配置为windows服务中的坑

网上搜索“nginx 配置为windows服务”,很容易搜索到使用windows server warpper来配置,于是按照网上的方法我从github上的链接下载了1.17版本,前面都很顺利,很容易就配置成服务了,但就在启动服务的时候出异常了。错误大致如下

nginx: [alert] could not open error log file: CreateFile() " e:\nginx/logs/error.log" failed (123: The filename, directory name, or volume label syntax is incorrect)
2015/07/07 16:52:34 [emerg] 44296#48576: CreateFile() " e:\nginx/conf/nginx.conf" failed (123: The filename, directory name, or volume label syntax is incorrect)

网上搜索了大量资料,改过各种命令都不行。就在快放弃时,从网上下了个1.9版本,重新安装,启动,一切顺利。看来,这是版本差异了。

下面放出我刚才下的版本,当然你也可以试试其他版本。

下载链接