I will show a simple tip to test nginx configuration on live site ( production server ) before deployment.
This is especially useful for server serving many different sites. A little mis-configuration, even a missed comma, can instantly bring down hundreds or even thousands of sites. So you should test it first:
sudo service nginx configtest
If it fails then you can find the cause of failure at:
Fix it (verify using
configtest as above and then run as usual:
sudo service nginx reload
nginx, currently at 33% market share, is a very popular web server.