Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What is the best way to apply config changes to Nginx without users experiencing errors (requests being denied or exited)?

I have scoured the interwebs and no place can give a definitive answer to this process.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can:

nginx -s reload

You can:

kill -HUP $NGINXPID

Found by searching 'nginx reload config', first hit is the CommandLine page on the nginx wiki.

share|improve this answer
    
Yeah those are the two commands I've consistently seen. But which is better? –  GarySingletary Nov 6 '13 at 18:35
    
I don't think it matters much, they should both work. It may be easier to use the nginx -s reload command since you won't have to track down the PID of nginx. –  yoonix Nov 6 '13 at 20:06
nginx -s reload

and

kill -HUP $NGINXPID

do the very same thing, sending the main nginx process SIGHUP.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.