deiban下nginx可能引起的配置冲突

来源:互联网 发布:混合矩阵 报价 编辑:程序博客网 时间:2024/06/05 10:10

nginx的默认配置文件路径 /etc/nginx/nginx.conf

user www-data;

worker_processes  1;

 

error_log  /var/log/nginx/error.log;

pid        /var/run/nginx.pid;

 

events {

    worker_connections  1024;

}

 

http {

    include       /etc/nginx/mime.types;

    default_type  application/octet-stream;

 

    access_log  /var/log/nginx/access.log;

 

    sendfile        on;     

    #tcp_nopush     on;     

 

    #keepalive_timeout  0;

    keepalive_timeout  65;

    tcp_nodelay        on;     

 

    gzip  on;

 

    include /etc/nginx/conf.d/*.conf;

    include /etc/nginx/sites-enabled/*;

}

 

详细配置在粗体行中指示的路径中 /etc/nginx/sites-enabled/default

在该路径中不应存放default的备份,这样会造成配置项冲突。因为这样当前项和备份项会被全部采用。

原创粉丝点击