Can not restart nginx (apache_nginx + php5-fpm)

quangtam

Verified User
Joined
Sep 8, 2011
Messages
18
Hi,

I'm use webserver is apache_nginx and everytime I add the new domain I need to manual to build rewrite_confs then I can restart nginx. Anybody help me to resolve this issue, please?

Thanks & Best regards,
 
Hello,

What do you see with:

Code:
/sbin/service nginx restart
?

Code:
/sbin/service httpd restart
?

after you add a new domain?

If you want I could check it for you on your server and fix it, in this case it will cost you an hourly rate of mine.
 
Hello,

What do you see with:

Code:
/sbin/service nginx restart
?

Code:
/sbin/service httpd restart
?

after you add a new domain?

If you want I could check it for you on your server and fix it, in this case it will cost you an hourly rate of mine.

I think this is a bug of DirectAdmin, when I've tried to restart nginx from cmd, I've got message:
nginx: [emerg] listen() to 0.0.0.0:8080, backlog 511 failed (98: Address already in use)

This issue only resolved after run build rewrite_confs, but it will happend after add an other domain or subdomain :(
 
Try and open the file: /etc/init.d/nginx

change

Code:
stop() {
        echo -n $"Stopping $prog: "
        #killproc $prog -QUIT
        $nginx -s stop
        retval=$?
        echo
        [ $retval -eq 0 ] && rm -f $lockfile
        return $retval
}

to

Code:
stop() {
        echo -n $"Stopping $prog: "
        killproc $prog -QUIT
        #$nginx -s stop
        retval=$?
        echo
        [ $retval -eq 0 ] && rm -f $lockfile
        return $retval
}

and see whether or not it solves the issue.
 
Back
Top