nginx指定配置文件启动
https://blog.csdn.net/csdndd521/article/details/124503973
启动方法:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
– /sbin/nginx 所在路径 -t -c 主配置文件
测试 :/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
重启 : /usr/local/nginx/sbin/nginx -s reload -c /usr/local/nginx/conf/nginx.conf
------
验证:/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx_data.conf
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
重启: /usr/local/nginx/sbin/nginx -s reload -c /usr/local/nginx/conf/nginx_data.conf
/usr/local/nginx/sbin/nginx -s reload -c /usr/local/nginx/conf/nginx.conf
停止:
/usr/local/nginx/sbin/nginx -s stop
启动:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx_data.conf
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf