Nginx配置简介

1. Nginx配置简介:

   nginx软件目录:

工作目录:/etc/nginx
执行文件:/usr/sbin/nginx
日志目录:/var/log/nginx
启动文件:/etc/init.d/nginx
web目录:/var/www/html/          首页文件是index.nginx-debian.html
        /usr/share/nginx/html/  首页文件是index.html

  nginx配置文件:

默认文件:
        /etc/nginx/nginx.conf       # Nginx配置文件所在目录   
其他目录:
        /etc/nginx/conf.d/*.conf    # 在该目录下添加server配置: 在此目录下新建.conf文件,在conf文件中添加server配置
        /etc/nginx/sites-enabled/*  # 在该目录下默认有个default文件, default文件中有个默认server配置

2. 配置文件

   1) 配置文件结构

  2)配置文件naginx.conf中包含的文件

3.Ngin访问原理

                         

原文地址:https://www.cnblogs.com/yqyn-study/p/13344000.html