How to Restart Nginx Web Server On Ubuntu

We can restart Ubuntu Nginx Web Server using systemctl command. To restart Nginx, In the Command line interface, type:

systemctl restart nginx

On Ubuntu 14.04 you need to use the service command instead of the systemctl command.

service nginx restart

It is also possible to reload the configuration file without restarting the Web Server.

systemctl reload nginx

The above command will reload the Nginx configuration file.

submit to reddit