Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using upstart 1.8-0ubuntu1 on Ubuntu-1210-quantal-64-minimal.

It shows me nginx to be running, when it's not.

# service nginx status
nginx start/running, process 2543
# ps -p 2543

My config:

# nginx

description "nginx http daemon"
author "George Shammas <>"

start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]

env DAEMON=/opt/nginx/sbin/nginx
env PID=/opt/nginx/logs/

expect fork
#respawn limit 10 5
#oom never

pre-start script
        $DAEMON -t
        if [ $? -ne 0 ]
                then exit $?
end script

exec $DAEMON
share|improve this question
probably somehow .pid file is somewhere didn't get deleted. – Danila Ladner Sep 27 '13 at 15:38
right so check if /opt/nginx/logs/ exists and then compare it with "ps -waux | grep -i ngnix" – Danila Ladner Sep 27 '13 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.