1 查找nginx安装目录
ps -ef | grep nginx
oot 21908 1 0 11:50 ? 00:00:00 nginx: master process **/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf**
nobody 21909 21908 0 11:50 ? 00:00:00 nginx: worker process
nobody 21910 21908 0 11:50 ? 00:00:00 nginx: worker process
nobody 21911 21908 0 11:50 ? 00:00:00 nginx: worker process
nobody 21912 21908 0 11:50 ? 00:00:00 nginx: worker process
root 24883 16057 0 14:34 pts/2 00:00:00 grep nginx
[root@iZ2558pjddbZ sbin]# ^C
master后边就是nginx的安装目录
2 进入安装目录 sbin下(cd /usr/local/nginx/sbin) 执行 nginx -s reload
3另一种方法
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf