记录windows下使用Nginx的问题
1、启动失败
C:\WINDOWS\system32>nginx.exe
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2018/09/30 07:29:16 [emerg] 10504#6732: CreateFile() "C:\WINDOWS\system32/conf/nginx.conf" failed (3: The system cannot find the path specified)
解决方法:在nginx目录下启动。
C:\WINDOWS\system32>cd /d D:\IDE\nginx-1.15.3
D:\IDE\nginx-1.15.3>nginx.exe
直接在浏览器地址栏输入网址 http://localhost:80,回车,出现以下页面说明启动成功
或者在cmd命令窗口输入命令 tasklist /fi "imagename eq nginx.exe" ,出现如下结果说明启动成功