Update Nextcloud nginx.conf

This commit is contained in:
hoellen 2020-05-25 15:20:51 +02:00
parent 13b16b9d2b
commit 65ed611b48

View File

@ -3,6 +3,7 @@ server {
root /nextcloud;
fastcgi_buffers 64 4K;
fastcgi_hide_header X-Powered-By;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header Referrer-Policy "no-referrer" always;
@ -25,11 +26,11 @@ server {
rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 https://$host/remote.php/dav;
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 https://$host/remote.php/dav;
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location / {
@ -49,7 +50,6 @@ server {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_hide_header X-Powered-By;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param modHeadersAvailable true;
@ -67,7 +67,7 @@ server {
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=7200";
add_header Cache-Control "public, max-age=15778463";
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;