nginx config test code example
Example 1: nginx syntax check
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Example 2: config test nginx
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Example 3: nginx syntax check
$ [sudo] nginx -t
Example 4: config test nginx
$ sudo nginx -T