当前位置:   article > 正文

Nginx的配置文件路径,nginx安装路径_docker安装nginx未安装在etc文件夹

docker安装nginx未安装在etc文件夹

1、通过apt-get 安装 Nginx的配置文件在/etc/nginx/nginx.conf目录下。

注:通过源码,tar 解压,执行sbin/configure安装一般在/usr/local/nginx

 

2、查找nginx安装路径

(1)通过查看监听进程号,然后查看该进程,查看安装路径

# netstat -tnlp | grep nginx

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1215/nginx

tcp6       0      0 :::80                   :::*                    LISTEN      1215/nginx

 

# ps -aux | grep 1215

root       1215  0.0  0.2  85896  2824 ?        Ss   10:09   0:00 nginx: master process /usr/sbin/nginx

root       2053  0.0  0.2  14084  2572 pts/0    S+   10:58   0:00 grep --color=auto 1215

 

(2)查看nginx是以哪个config启动的

# ps -ef | grep nginx

root       1215      1  0 10:09 ?        00:00:00 nginx: master process /usr/sbin/nginx

www-data   1216   1215  0 10:09 ?        00:00:00 nginx: worker process

www-data   1217   1215  0 10:09 ?        00:00:00 nginx: worker process

www-data   1218   1215  0 10:09 ?        00:00:00 nginx: worker process

www-data   1219   1215  0 10:09 ?        00:00:00 nginx: worker process

root       2049   2009  0 10:57 pts/0    00:00:00 grep --color=auto nginx

 

(3) 查看nginx是否安装以及路径

# find / |grep nginx.conf

/etc/nginx/nginx.conf

/etc/nginx/conf.d

/home/xxx/program_tar/nginx-1.2.2/conf/nginx.conf

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/254358?site
推荐阅读
相关标签
  

闽ICP备14008679号