Nginx as a Linux Service

Eugene Janusov eugene at annah.ru
Thu Oct 30 19:00:19 MSK 2008


> But before I try this out, I'd like to know what difference there is
> between copying the nginx executable into /etc/init.d and using
> chkconfig, on one hand, and copying the nginx executable into
> /etc/rc.local, on the other hand.

/etc/init.d should contain special init scripts. If you don't have such 
script for nginx, you could try to make symlink and use it. But copying 
executable directly to that directory is not a good behavior.

/etc/rc.local just executes listed commands after the end of all 
multi-user boot levels. Services started this way is not managed through 
runlevels properly — for example, when system shutdowns or reboots. So, 
you should use it only if you can't use init.d, or if you are too lazy 
for it.

-- 
Best regards,
Eugene Janusov.





More information about the nginx mailing list