cd /usr/local/nginx/sbin/
./nginx -v
结果输出:nginx version: nginx/1.16.1
./nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful
Nginx 启动命令如下:
[root@bogon conf]# ./nginx
停止命令
/usr/local/webserver/nginx/sbin/nginx -s stop # 停止 Nginx
启动完成后可以查看Nginx进程:
ps -ef | grep nginx
/usr/local/webserver/nginx/sbin/nginx -s reload # 重新载入配置文件