随笔 - 363, 文章 - 0, 评论 - 2, 阅读 - 23万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

linux 查看nginx 启动路径

Posted on   心默默言  阅读(2113)  评论(0编辑  收藏  举报

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

 

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-07-20 MySQL发生系统错误2 系统无法找到指定文件
点击右上角即可分享
微信分享提示