ฉันต้องการหยุด Nginx แต่มันล้มเหลวเช่นนี้
$ sudo service nginx stop
Stopping nginx:                                            [FAILED]
และnginx.confที่กำหนดสถานที่ของ nginx.pid มีบรรทัด
# /etc/nginx/nginx.conf
pid        /var/run/nginx.pid;
แต่ไม่มีในไดเรกทอรีnginx.pid/var/run/
locate nginx.pid แสดงผลลัพธ์นี้
/var/run/nginx.pid 
/var/run/nginx.pid.oldbin
แต่หลังจากที่updatedbไม่มีการจับคู่การค้นหา ฉันใช้ Nginx / 1.4.4 CentOS release 6.5 (Final)ใน
ฉันควรทำอย่างไรเพื่อหยุด nginx daemon
แก้ไข 2014/01/07
นี่เป็นเอาต์พุตของps -ef | grep nginxดูเหมือนว่า nginx daemon ยังคงทำงานอยู่
ironsand 17065 16933  0 15:55 pts/0    00:00:00 grep --color nginx
root     19506     1  0  2013 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
ironsand 19507 19506  0  2013 ?        00:00:25 nginx: worker process  
และsudo service nginx restartให้ข้อผิดพลาดนี้ ฉันคิดว่าnginxล้มเหลวในการเริ่มต้นเนื่องจากยังมีชีวิตอยู่ และ/var/log/nginx/error.log-2014017มีข้อผิดพลาดนี้เช่นกัน
Stopping nginx:                                            [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
                                                           [FAILED]
psคำสั่ง
                
ps -ef | grep nginxsudo netstat -tlnp | grep nginx