linux 查看nginx 启动路径


https://blog.csdn.net/qq_38675373/article/details/109717879

 由于系统中有多个nginx目录,不知道哪一个哪一个才是真正的正在运行的服务,记录查看nginx启动路径定位。

1.查找nginx的pid

[root@wskh xpe]# netstat -anop | grep 0.0.0.0:80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2320/nginx: master   off (0.00/0/0)

2.查找指定pid正在运行服务的启动路径

[root@wskh xpe]# ll /proc/2320/exe
lrwxrwxrwx 1 root root 0 11月 16 11:29 /proc/2320/exe -> /usr/local/nginx/sbin/nginx

3.查找nginx启动使用的配置文件

[root@wskh xpe]# /usr/local/nginx/sbin/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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM