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