nextcloud/apache_secure_data

33 lines
1.1 KiB
Plaintext
Raw Normal View History

Alias /nextcloud "@DATAPATH@/"
<Directory "@DATAPATH@">
Options +FollowSymLinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
<IfModule mod_headers.c>
Header always set Referrer-Policy no-referrer
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>
SetEnv HOME @DATAPATH@
SetEnv HTTP_HOME @DATAPATH@
</Directory>
<Directory "@DATAPATH@/data/">
# just in case if .htaccess gets disabled
Require all denied
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
RewriteRule ^/\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/nodeinfo /nextcloud/public.php?service=nodeinfo [QSA,L]
RewriteRule ^/\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
RewriteRule ^/\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
</IfModule>