For me, I run "killall nginx" and start it by "sbin/nginx", anyone has a better restart script?
BTW: I install nginx from source, i do not find 'service nginx' command or /etc/init.d/nginx
The nginx package supplies a /etc/init.d/nginx script that provides the usual start|stop|restart|reload ... functionality.
will restart nginx
Here is a link to a script you can use as /etc/init.d/nginx.
inside the links there are some command for start and stop nginx server
for starting nginx:
for stoping nginx:
You can find init scripts in the NginX Wiki: http://wiki.nginx.org/Configuration#Init_Scripts
The restart function runs the following command:
If you've nginx installed in /opt/nginx, replace
Usually, packages installed from source don't install startup script at
1- You can look for a script in the source code directory or on the website, and customise it if needed.
2- You can copy a startup script for another package from your system and customise it.
After editing the configuration files, I restart it like this on OpenBSD:
This is how it looks:
The fact that the time from the log is not between times printed by