From d7b6d7c0a660962f74e08f4a610eccf15bedb9c1 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Sun, 16 Feb 2014 18:11:06 +0000 Subject: [PATCH] Avoid multiple index directives (#1065488). --- nginx.conf | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nginx.conf b/nginx.conf index ace77a2..b2bbf14 100644 --- a/nginx.conf +++ b/nginx.conf @@ -40,31 +40,30 @@ http { # for more information. include /etc/nginx/conf.d/*.conf; + index index.html index.htm; + server { listen 80; server_name localhost; + root /usr/share/nginx/html; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location / { - root /usr/share/nginx/html; - index index.html index.htm; } # redirect server error pages to the static page /40x.html # error_page 404 /404.html; location = /40x.html { - root /usr/share/nginx/html; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { - root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 @@ -98,10 +97,9 @@ http { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; + # root html; # location / { - # root html; - # index index.html index.htm; # } #} @@ -111,6 +109,7 @@ http { #server { # listen 443; # server_name localhost; + # root html; # ssl on; # ssl_certificate cert.pem; @@ -123,8 +122,6 @@ http { # ssl_prefer_server_ciphers on; # location / { - # root html; - # index index.html index.htm; # } #}