From c06a6485d6a3025c89d233c2c2066c8c7582d32e Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 11 Nov 2014 12:20:25 -0800 Subject: [PATCH] Make the root more obvious, fix DirectoryIndex to php first --- 5.4/apache/apache2.conf | 9 +++++++-- 5.5/apache/apache2.conf | 9 +++++++-- 5.6/apache/apache2.conf | 9 +++++++-- apache2.conf | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/5.4/apache/apache2.conf b/5.4/apache/apache2.conf index 85ef3788..09f4a920 100644 --- a/5.4/apache/apache2.conf +++ b/5.4/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/5.5/apache/apache2.conf b/5.5/apache/apache2.conf index 85ef3788..09f4a920 100644 --- a/5.5/apache/apache2.conf +++ b/5.5/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/5.6/apache/apache2.conf b/5.6/apache/apache2.conf index 85ef3788..09f4a920 100644 --- a/5.6/apache/apache2.conf +++ b/5.6/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/apache2.conf b/apache2.conf index 85ef3788..09f4a920 100644 --- a/apache2.conf +++ b/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html