Merge pull request #3505 from robert-scheck/autoindex

Only request "IndexIgnore" if mod_autoindex is loaded
This commit is contained in:
Lukas Reschke 2017-02-20 14:25:09 +01:00 committed by GitHub
commit d3f774d035
4 changed files with 8 additions and 0 deletions

View file

@ -11,4 +11,6 @@ Satisfy All
</ifModule>
# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>

View file

@ -9,4 +9,6 @@ deny from all
</ifModule>
# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>

View file

@ -9,4 +9,6 @@ deny from all
</ifModule>
# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>

View file

@ -492,7 +492,9 @@ class Setup {
$content.= "Satisfy All\n";
$content.= "</ifModule>\n\n";
$content.= "# section for Apache 2.2 and 2.4\n";
$content.= "<ifModule mod_autoindex.c>\n";
$content.= "IndexIgnore *\n";
$content.= "</ifModule>\n";
$baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
file_put_contents($baseDir . '/.htaccess', $content);