HostOnNet Blog

Testing Nginx Configuration file

When you edit nginx coniguration file, it is better to test the new config file before you restart. This can be done with command

nginx -t


root@ip-172-31-0-223:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

You can also use command

service nginx configtest

See also nginx

Posted in Web Server