首页 > 系统服务 > 详细

linux系统下nginx安装目录和nginx.conf配置文件目录

时间:2017-03-13 21:17:21      阅读:265      评论:0      收藏:0      [点我收藏+]

linux系统下nginx安装目录和nginx.conf配置文件目录

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服务

[root@localhost ~]# nginx安装目录 -c nginx.conf配置文件目录

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

linux系统下nginx安装目录和nginx.conf配置文件目录

原文:http://www.cnblogs.com/zhangxintong1314/p/6545061.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!