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 "server_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 https://nginx.viraptor.info/

Read more about nginx flags here