Nginx笔记

查找nginx路径

ps -ef | grep nginx
root       94365       1  0 22:07 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
nobody     94366   94365  0 22:07 ?        00:00:00 nginx: worker process
nobody     94367   94365  0 22:07 ?        00:00:00 nginx: worker process
root       94430   94418  0 22:10 pts/0    00:00:00 grep --color=auto nginx

查找配置文件

首先要知道nginx的安装路径

/usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

重启Nginx

1.通过服务指令重启,适用于通过yum等命令安装nginx
service nginx restart
2.通过nginx程序重启,适合大部分场景
./nginx -s reload

posted @ 2022-02-01 22:16  InkYi  阅读(35)  评论(0编辑  收藏  举报