/usr/local/bin » ./nginx -V
nginx version: nginx/1.19.2
built by clang 11.0.3 (clang-1103.0.32.62)
built with OpenSSL 1.1.1g 21 Apr 2020
TLS SNI support enabled
/usr/local/etc/nginx » nginx -h
nginx version: nginx/1.19.2
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/Cellar/nginx/1.19.2/)
-c filename : set configuration file (default: /usr/local/etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file
9、判断配置文件是否有问题
/usr/local/etc/nginx » nginx -t
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful