1. 程式人生 > >啟動nginx時候報錯

啟動nginx時候報錯

找不到 -c -s 指定 oot ati number success syn

[root@web02 conf]# /application/nginx/sbin/nginx -t
nginx: the configuration file /application/nginx-1.6.3/conf/nginx.conf syntax is ok
nginx: configuration file /application/nginx-1.6.3/conf/nginx.conf test is successful

[root@web02 conf]# /application/nginx/sbin/nginx -s reload
nginx: [error] invalid PID number "" in "/application/nginx-1.6.3/logs/nginx.pid"

啟動的時候報錯

解決辦法
其實原因是找不到配置文件 需要指定一下

[root@web02 conf]# /application/nginx/sbin/nginx -c /application/nginx/conf/nginx.conf[root@web02 conf]# /application/nginx/sbin/nginx -s reload

啟動nginx時候報錯