从新启动服务器,访问web服务发现没法浏览啦!登录服务器以后进到nginx使用./nginx -s reload从新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件nginx
[root@localhost sbin]# ./nginx -s reloadweb
nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)服务器
解决方法:blog
[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf配置
使用nginx -c的参数指定nginx.conf文件的位置file
[root@localhost nginx]# cd logs/方法
[root@localhost logs]# llim
总用量 12error
-rw-r--r-- 1 root root 1246 12月 9 18:10 access.log配置文件
-rw-r--r-- 1 root root 516 12月 10 15:39 error.log
-rw-r--r-- 1 root root 5 12月 10 15:38 nginx.pid
看nginx.pid文件已经有了。