aboutsummaryrefslogtreecommitdiffstats
path: root/lib/setup.php
diff options
context:
space:
mode:
authorStefan Seidel <android@stefanseidel.info>2012-11-09 13:30:07 +0100
committerStefan Seidel <android@stefanseidel.info>2012-11-09 13:30:07 +0100
commit8f669880bc86c71388b20471c3b96bd86ae14fa7 (patch)
treef29ce468bc9d583daf0e772993eab0f12fca1e60 /lib/setup.php
parentc0538636440b7293dd074ff4867bd950d426cea3 (diff)
downloadnextcloud-server-8f669880bc86c71388b20471c3b96bd86ae14fa7.tar.gz
nextcloud-server-8f669880bc86c71388b20471c3b96bd86ae14fa7.zip
Fix WebDAV (and Android Client) not being able to authorize on Debian Squeeze + mod_fcgid installs.
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 726b3352d50..013ae2f6efc 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -573,7 +573,15 @@ class OC_Setup {
* create .htaccess files for apache hosts
*/
private static function createHtaccess() {
- $content = "ErrorDocument 403 ".OC::$WEBROOT."/core/templates/403.php\n";//custom 403 error page
+ $content = "<IfModule mod_fcgid.c>\n";
+ $content.= "<IfModule mod_setenvif.c>\n";
+ $content.= "<IfModule mod_headers.c>\n";
+ $content.= "SetEnvIfNoCase ^Authorization$ \"(.+)\" XAUTHORIZATION=$1\n";
+ $content.= "RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION\n";
+ $content.= "</IfModule>\n";
+ $content.= "</IfModule>\n";
+ $content.= "</IfModule>\n";
+ $content.= "ErrorDocument 403 ".OC::$WEBROOT."/core/templates/403.php\n";//custom 403 error page
$content.= "ErrorDocument 404 ".OC::$WEBROOT."/core/templates/404.php\n";//custom 404 error page
$content.= "<IfModule mod_php5.c>\n";
$content.= "php_value upload_max_filesize 512M\n";//upload limit