To restart the nginx web server use any one of the following command as a root user. Open a terminal or login to the remote server using ssh.
Debian/Ubuntu/RHEL/CentOS Linux
Use the following command:
# /etc/init.d/nginx restart
OR
# /etc/init.d/nginx reload
OR
# service nginx restart
OR
# service nginx reload
However, recommend way is as follows. This should work with any Linux distributions or Unix like operating systems:
# nginx -s reload
OR
# /path/to/full/nginx -s reload
If nginx compiled and installed from source code
If nginx binary is installed at /usr/local/nginx/sbin/nginx, enter:
# /usr/local/nginx/sbin/nginx -s reload
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 2 comments… read them below or add one }
The method used is largely determined by whether NGINX was installed via package manager or compiled from source, correct?
I guess so. If compiled from source use /path/to/nginx -s reload else use service nginx reload or service nginx restart