rich4 -nginx
Linux下如何查看定位当前正在运行的Nginx的配置文件
一、检查有哪配置文件
sudo find / -name "nginx.conf"
/usr/local/nginx/conf/nginx.conf
/www/server/nginx/conf/nginx.conf
/www/server/FFmpeg/nginx-1.19.5/conf/nginx.conf
/www/server/FFmpeg/nginx-1.19.5/nginx-http-flv-module-master/test/nginx.conf
二、查看使用哪个配置文件
- 查看nginx的PID,以常用的80端口为例:
netstat -anop | grep 0.0.0.0:80
- 通过相应的进程ID(比如:4562)查询当前运行的nginx路径:
ll /proc/4562/exe
- 获取到nginx的执行路径后,使用-t参数即可获取该进程对应的配置文件路径,如:
/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
rich4
somdip2024-08-02 11:45
相关推荐
路由侠内网穿透11 分钟前
本地部署开源自托管服务器监控系统哪吒监控并实现外部访问鹿青1 小时前
给设计稿做体检:我搓了个 Skill,专治 Figma 转代码出垃圾陈_杨1 小时前
鸿蒙APP开发:足球战术App怎么做拖拽交互?球员拖动与路线绘制陈_杨1 小时前
鸿蒙APP开发:如果你想在鸿蒙App里做属性动画,@ohos.animator怎么用陈_杨1 小时前
鸿蒙APP开发:篮球App怎么画球场?鸿蒙Canvas绘图实战colofullove1 小时前
前端工程搭建与用户访问流程设计广州华水科技1 小时前
如何利用单北斗GNSS系统实现大坝的变形监测?代码小库2 小时前
【2026前端最新面试题——day10】JavaScript 高频面试题zzz_23682 小时前
【Spring】面试突击系列(三):Spring Web MVC 深度解析