diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-08 17:29:14 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-08 17:29:14 +0100 |
commit | b5e013973be7b72bde61e967d12776d91733ef04 (patch) | |
tree | b4bbee57050e39fc9f0efa61619661011c34855d /lib/private/setup.php | |
parent | 9c8b1e1775ecd9cc4fbd7ce11cc94ca9c0469f1a (diff) | |
download | nextcloud-server-b5e013973be7b72bde61e967d12776d91733ef04.tar.gz nextcloud-server-b5e013973be7b72bde61e967d12776d91733ef04.zip |
implementing solution using <ifModule mod_authz_core>
Diffstat (limited to 'lib/private/setup.php')
-rw-r--r-- | lib/private/setup.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php index d15d4a3fbed..b5c530a091f 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -168,10 +168,14 @@ class OC_Setup { //Require all denied $now = date('Y-m-d H:i:s'); $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.= "# Require all denied\n\n"; - $content.= "# line below if for Apache 2.2 - please remove it once you upgrade to Apache 2.4\n"; - $content.= "deny from all\n\n"; + $content.= "# line below if for Apache 2.4\n"; + $content.= "<ifModule mod_authz_core>\n"; + $content.= "Require all denied\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.= "IndexIgnore *\n"; file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content); |