Nginx Config Test & Location Matcher Test

Unsure about the nginx configuration you just changed? Pass in a flag to test the configuration and be told of errors before restarting nginx.

nginx -t

# would output for example:
nginx: [emerg] unknown directive "erver_name" in /etc/nginx/sites-enabled/default:3
nginx: configuration file /etc/nginx/nginx.conf test failed

Additionally, a very helpful website to test your nginx location blocks is

Read more about nginx flagshere