centos 查找nginx 您所在的位置:网站首页 怎么看nginx安装目录 centos 查找nginx

centos 查找nginx

2024-07-12 15:27| 来源: 网络整理| 查看: 265

1、查看nginx安装目录

输入命令

# ps  -ef | grep nginx

返回结果包含安装目录

root     2662    1 0 07:12 ?       00:00:00 nginx: master process /usr/sbin/nginx

2、查看nginx.conf配置文件目录

输入命令

# nginx -t

返回结果包含配置文件目录

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

3、启动nginx服务

[[email protected] ~]# nginx安装目录 -c nginx.conf配置文件目录

参数 “-c” 指定了配置文件的路径,如果不加 “-c” 参数,Nginx 会默认加载其安装目录的 conf 子目录中的 nginx.conf 文件。

查找nginx安装的路径以及相关安装操作命令

Linux环境下,怎么确定Nginx是以那个config文件启动的?

[[email protected] ~]# ps -ef | grep nginx

root 21196 1 0 23:40 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf

nginx 21197 21196 0 23:40 ? 00:00:00 nginx: worker process

root 21199 20993 0 23:42 pts/0 00:00:00 grep --color&



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有