Rremove Index from options to prevent directory listings

This commit is contained in:
Isaac Connor 2016-11-08 09:30:24 -05:00
parent 406a7ebdec
commit b059ca83da
5 changed files with 17 additions and 6 deletions

View File

@ -1,7 +1,7 @@
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +FollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -9,7 +9,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
php_flag register_globals off php_flag register_globals off
Options Indexes FollowSymLinks Options -Indexes +FollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -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"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +ollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>
</Directory> </Directory>
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>

View File

@ -8,7 +8,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +ollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -10,7 +10,7 @@
DocumentRoot "@WEB_PREFIX@" DocumentRoot "@WEB_PREFIX@"
<Directory "@WEB_PREFIX@"> <Directory "@WEB_PREFIX@">
Options FollowSymLinks Options -Indexes +FollowSymLinks
AllowOverride All AllowOverride All
</Directory> </Directory>