From 6361f143878ce00659f64ce42593951d773e4e63 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 8 Nov 2016 09:30:24 -0500 Subject: [PATCH] Rremove Index from options to prevent directory listings --- distros/debian/apache.conf | 2 +- distros/ubuntu1204/conf/apache2/zoneminder.conf | 2 +- .../ubuntu1504_cmake_split_packages/apache.conf | 15 +++++++++++++-- distros/ubuntu1604/conf/apache2/zoneminder.conf | 2 +- misc/apache.conf.in | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/distros/debian/apache.conf b/distros/debian/apache.conf index 6f2f30fd9..9a3238807 100644 --- a/distros/debian/apache.conf +++ b/distros/debian/apache.conf @@ -1,7 +1,7 @@ Alias /zm /usr/share/zoneminder/www - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks DirectoryIndex index.php diff --git a/distros/ubuntu1204/conf/apache2/zoneminder.conf b/distros/ubuntu1204/conf/apache2/zoneminder.conf index fa596d5ab..0dc312769 100644 --- a/distros/ubuntu1204/conf/apache2/zoneminder.conf +++ b/distros/ubuntu1204/conf/apache2/zoneminder.conf @@ -9,7 +9,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" Alias /zm /usr/share/zoneminder/www php_flag register_globals off - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks DirectoryIndex index.php diff --git a/distros/ubuntu1504_cmake_split_packages/apache.conf b/distros/ubuntu1504_cmake_split_packages/apache.conf index 6f2f30fd9..292581e78 100644 --- a/distros/ubuntu1504_cmake_split_packages/apache.conf +++ b/distros/ubuntu1504_cmake_split_packages/apache.conf @@ -1,8 +1,19 @@ -Alias /zm /usr/share/zoneminder/www +# Remember to enable cgi mod (i.e. "a2enmod cgi"). +ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" + + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + AllowOverride All + Require all granted + +Alias /zm /usr/share/zoneminder/www - Options Indexes FollowSymLinks + Options -Indexes +ollowSymLinks DirectoryIndex index.php + + + AllowOverride All + diff --git a/distros/ubuntu1604/conf/apache2/zoneminder.conf b/distros/ubuntu1604/conf/apache2/zoneminder.conf index 40fbf4d7c..292581e78 100644 --- a/distros/ubuntu1604/conf/apache2/zoneminder.conf +++ b/distros/ubuntu1604/conf/apache2/zoneminder.conf @@ -8,7 +8,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" Alias /zm /usr/share/zoneminder/www - Options Indexes FollowSymLinks + Options -Indexes +ollowSymLinks DirectoryIndex index.php diff --git a/misc/apache.conf.in b/misc/apache.conf.in index 1ea6ed7c1..5ad45338b 100644 --- a/misc/apache.conf.in +++ b/misc/apache.conf.in @@ -10,7 +10,7 @@ DocumentRoot "@WEB_PREFIX@" - Options FollowSymLinks + Options -Indexes +FollowSymLinks AllowOverride All