Home >Operation and Maintenance >Nginx >In which directory is the nginx configuration file located?

In which directory is the nginx configuration file located?

(*-*)浩
(*-*)浩Original
2019-11-02 09:32:447008browse

In which directory is the nginx configuration file located?

Nginx directory structure (Recommended learning: nginx tutorial)

Execute the command tree /application/nginx ; If tree If the command cannot be found, execute yum install tree -y to install

[root@www ~]# tree /application/nginx/
/application/nginx/
|-- client_body_temp
|-- conf                                  #这是Nginx所有配置文件的目录,极其重要
|   |-- fastcgi.conf                    #fastcgi相关参数的配置文件
|   |-- fastcgi.conf.default                 #fastcgi.conf的原始备份
|   |-- fastcgi_params                   #fastcgi的参数文件
|   |-- fastcgi_params.default
|   |-- koi-utf
|   |-- koi-win
|   |-- mime.types                      #媒体类型,
|   |-- mime.types.default
|   |-- nginx.conf                      #这是Nginx默认的主配置文件
|   |-- nginx.conf.default
|   |-- scgi_params                     #scgi相关参数文件,一般用不到
|   |-- scgi_params.default
|   |-- uwsgi_params                       #uwsgi相关参数文件,一般用不到
|   |-- uwsgi_params.default
|   `-- win-utf
|-- fastcgi_temp                       #fastcgi临时数据目录
|-- html                       #这是编译安装时Nginx的默认站点目录,类似
                    Apache的默认站点htdocs目录
|   |--50x.html     #     错误页面优雅替代显示文件,例如:出现502错误时会调用此页面
         #     error_page   500502503504  /50x.html;
|   `-- index.html   #     默认的首页文件,首页文件名字是在nginx.conf中事先定义好的。
|-- logs          #这是Nginx默认的日志路径,包括错误日志及访问日志
|   |-- access.log      #     这是Nginx的默认访问日志文件,使用tail -f access.log,可以实时观看网站用户访问情况信息
|   |-- error.log      #     这是Nginx的错误日志文件,如果Nginx出现启动故障等问题,一定要看看这个错误日志
|   `-- nginx.pid      #     Nginx的pid文件,Nginx进程启动后,会把所有进程的ID号写到此文件
|-- proxy_temp       #临时目录
|-- sbin      #这是Nginx命令的目录,如Nginx的启动命令nginx
|   `-- nginx      #Nginx的启动命令nginx
|-- scgi_temp      #临时目录
`-- uwsgi_temp      #临时目录
9 directories,21 files

The above is the detailed content of In which directory is the nginx configuration file located?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn