mirror of
https://src.fedoraproject.org/rpms/nextcloud.git
synced 2025-01-10 10:51:54 +01:00
update httpd directives using latest upstream htaccess content
This commit is contained in:
parent
57e90b3869
commit
c455a1050d
@ -1,78 +1,8 @@
|
||||
# These are based on the .htaccess file shipped by ownCloud, with
|
||||
# appropriate adjustments for distribution packaging. Some directives
|
||||
# that are irrelevant to the Fedora/EPEL ecosystem are omitted. This
|
||||
# file contains directives that should be applied within the /nextcloud
|
||||
# filesystem; directives that should be applied site-wide when
|
||||
# ownCloud is installed are placed directly in nextcloud.conf.
|
||||
# The contents of the default Nextcloud .htaccess file are appended to this
|
||||
# file during build. Some directives may be irrelevant to the Fedora/EPEL
|
||||
# ecosystem but are NOT omitted.
|
||||
#
|
||||
# DO NOT EDIT THIS FILE DIRECTLY. To override any element of the
|
||||
# packaged ownCloud configuration, create a new /etc/httpd/conf.d/
|
||||
# file which will be read later than 'nextcloud.conf'.
|
||||
# packaged Nextcloud configuration, create a new /etc/httpd/conf.d/
|
||||
# file which will be read later than this one.
|
||||
|
||||
AllowOverride None
|
||||
|
||||
ErrorDocument 403 /nextcloud/core/templates/403.php
|
||||
ErrorDocument 404 /nextcloud/core/templates/404.php
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
|
||||
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
<FilesMatch \.(php|phar)$>
|
||||
SetHandler "proxy:unix:/run/php-fpm/nextcloud.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
php_value upload_max_filesize 10G
|
||||
php_value post_max_size 10G
|
||||
php_value memory_limit 512M
|
||||
php_value mbstring.func_overload 0
|
||||
php_value always_populate_raw_post_data -1
|
||||
php_value default_charset 'UTF-8'
|
||||
php_value output_buffering off
|
||||
<IfModule mod_env.c>
|
||||
SetEnv htaccessWorking true
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php7.c>
|
||||
php_value upload_max_filesize 10G
|
||||
php_value post_max_size 10G
|
||||
php_value memory_limit 512M
|
||||
php_value mbstring.func_overload 0
|
||||
php_value always_populate_raw_post_data -1
|
||||
php_value default_charset 'UTF-8'
|
||||
php_value output_buffering off
|
||||
<IfModule mod_env.c>
|
||||
SetEnv htaccessWorking true
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# The rewrites for legacy caldav and carddav URLs are omitted here
|
||||
# because they do not work with Fedora's ownCloud directory layout.
|
||||
# See https://github.com/nextcloud/core/issues/243#issuecomment-75426453
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteBase /nextcloud/
|
||||
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
RewriteRule ^remote/(.*) remote.php [QSA,L]
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
Options -Indexes
|
||||
|
||||
<IfModule pagespeed_module>
|
||||
ModPagespeed Off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(css|js)$">
|
||||
Header set Cache-Control "max-age=7200, public"
|
||||
</FilesMatch>
|
||||
# https://docs.nextcloud.com/server/25/admin_manual/installation/harden_server.html#enable-http-strict-transport-security
|
||||
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
|
||||
</IfModule>
|
||||
|
@ -13,15 +13,15 @@ Alias /nextcloud/apps-appstore /var/lib/nextcloud/apps
|
||||
Alias /nextcloud/assets /var/lib/nextcloud/assets
|
||||
Alias /nextcloud /usr/share/nextcloud
|
||||
|
||||
# This must be set explicitly in some environments, such as el9
|
||||
AddType text/javascript .mjs
|
||||
|
||||
# Allows compliant CalDAV / CardDAV clients to be configured using only
|
||||
# the domain name. For more details see # http://tools.ietf.org/html/rfc6764
|
||||
|
||||
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
|
||||
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
|
||||
Redirect 301 /.well-known/webdav /nextcloud/remote.php/dav
|
||||
# Nextcloud 29 checks specifically for trailing slash in dav 301 redirects
|
||||
# https://github.com/nextcloud/server/issues/45033#issuecomment-2079306503
|
||||
|
||||
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav/
|
||||
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav/
|
||||
Redirect 301 /.well-known/webdav /nextcloud/remote.php/dav/
|
||||
Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger
|
||||
Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo
|
||||
|
||||
|
@ -362,6 +362,9 @@ done
|
||||
# look for our sed placeholder we patched in earlier, then insert our formatted list of keywords
|
||||
sed -i "s|//sedplaceholder|${formattedlist}|" lib/private/IntegrityCheck/Checker.php
|
||||
|
||||
# Build nextcloud-defaults.inc from upstream .htaccess. We will install it later.
|
||||
cat .htaccess >> %{SOURCE105}
|
||||
|
||||
%check
|
||||
# Make sure there are no license files left over
|
||||
: Check for leftover license files
|
||||
|
Loading…
Reference in New Issue
Block a user