diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2021-09-23 10:27:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 10:27:37 +0200 |
commit | e6d7cdcfd7048089197123c51b4a28cfe189c0e9 (patch) | |
tree | 2e4e344b2a15ea4698f4615c68b02a14cfb3ccf2 | |
parent | 9410141747f3e63e624734cf6021082f2371fed9 (diff) | |
parent | fe89d00fd5eaed5b6f55479dc59276424e4285f7 (diff) | |
download | nextcloud-server-e6d7cdcfd7048089197123c51b4a28cfe189c0e9.tar.gz nextcloud-server-e6d7cdcfd7048089197123c51b4a28cfe189c0e9.zip |
Merge pull request #28827 from nextcloud/backport/26584/stable22
[stable22] Update .htaccess (php8+ and mod_lsapi)
-rw-r--r-- | .htaccess | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/.htaccess b/.htaccess index 2a6a0cbfac6..4986f7d380f 100644 --- a/.htaccess +++ b/.htaccess @@ -7,6 +7,10 @@ <IfModule mod_proxy_fcgi.c> SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1 </IfModule> + <IfModule mod_lsapi.c> + SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 + RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION + </IfModule> </IfModule> <IfModule mod_env.c> @@ -48,6 +52,8 @@ Header set Cache-Control "max-age=604800" </FilesMatch> </IfModule> + +# PHP 7.x <IfModule mod_php7.c> php_value mbstring.func_overload 0 php_value default_charset 'UTF-8' @@ -56,6 +62,30 @@ SetEnv htaccessWorking true </IfModule> </IfModule> + +# PHP 8+ +<IfModule mod_php.c> + php_value mbstring.func_overload 0 + php_value default_charset 'UTF-8' + php_value output_buffering 0 + <IfModule mod_env.c> + SetEnv htaccessWorking true + </IfModule> +</IfModule> + +<IfModule mod_mime.c> + AddType image/svg+xml svg svgz + AddEncoding gzip svgz +</IfModule> + +<IfModule mod_dir.c> + DirectoryIndex index.php index.html +</IfModule> + +<IfModule pagespeed_module> + ModPagespeed Off +</IfModule> + <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_USER_AGENT} DavClnt @@ -68,15 +98,6 @@ RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L] RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L] </IfModule> -<IfModule mod_mime.c> - AddType image/svg+xml svg svgz - AddEncoding gzip svgz -</IfModule> -<IfModule mod_dir.c> - DirectoryIndex index.php index.html -</IfModule> + AddDefaultCharset utf-8 Options -Indexes -<IfModule pagespeed_module> - ModPagespeed Off -</IfModule> |