Checking the nginx configuration

Installed nginx through homebrew. I know that on Ubuntu you can check the configuration using configtest via service:

pak@server: sudo service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Is it possible to check for OS X in the same way?

Author: aleksandr barakin, 2016-02-03

1 answers

Is it possible to test in the same way on OS X?

According to this answer is no.

But you can perform directly the action that is performed by the command you mentioned (you may need to specify the full path to the nginx program):

$ sudo nginx -t
 4
Author: aleksandr barakin, 2017-03-20 10:04:45