implementing solution using <ifModule mod_authz_core>
This commit is contained in:
parent
9c8b1e1775
commit
b5e013973b
|
@ -168,10 +168,14 @@ class OC_Setup {
|
||||||
//Require all denied
|
//Require all denied
|
||||||
$now = date('Y-m-d H:i:s');
|
$now = date('Y-m-d H:i:s');
|
||||||
$content = "# Generated by ownCloud on $now\n";
|
$content = "# Generated by ownCloud on $now\n";
|
||||||
$content.= "# line below if for Apache 2.4 - please uncomment if you run Apache 2.4\n";
|
$content.= "# line below if for Apache 2.4\n";
|
||||||
$content.= "# Require all denied\n\n";
|
$content.= "<ifModule mod_authz_core>\n";
|
||||||
$content.= "# line below if for Apache 2.2 - please remove it once you upgrade to Apache 2.4\n";
|
$content.= "Require all denied\n";
|
||||||
$content.= "deny from all\n\n";
|
$content.= "</ifModule>\n\n";
|
||||||
|
$content.= "# line below if for Apache 2.2\n";
|
||||||
|
$content.= "<ifModule !mod_authz_core>\n";
|
||||||
|
$content.= "deny from all\n";
|
||||||
|
$content.= "</ifModule>\n\n";
|
||||||
$content.= "# section for Apache 2.2 and 2.4\n";
|
$content.= "# section for Apache 2.2 and 2.4\n";
|
||||||
$content.= "IndexIgnore *\n";
|
$content.= "IndexIgnore *\n";
|
||||||
file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
|
file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
|
||||||
|
|
Loading…
Reference in New Issue