Guide / Web
Nginx Configuration
A compact workflow for checking configuration, virtual hosts and local HTTP responses.
Validate before reload
nginx -t
Never make a configuration change and immediately assume that the reload succeeded. Validate the configuration first.
Inspect the active configuration
nginx -T
Check the service
systemctl status nginx --no-pager
journalctl -u nginx --no-pager -n 100
Test locally
curl -I http://127.0.0.1:8080/
A local HTTP response separates an application or Nginx problem from a DNS, firewall or external routing problem.
Reload safely
nginx -t && systemctl reload nginx