69 regels
1.9 KiB
Nginx Configuration File
69 regels
1.9 KiB
Nginx Configuration File
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name cloud.[DOMAIN];
|
|
|
|
ssl_certificate /etc/letsencrypt/live/cloud.[DOMAIN]/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/cloud.[DOMAIN]/privkey.pem;
|
|
|
|
client_max_body_size 0;
|
|
underscores_in_headers on;
|
|
|
|
# Warning HSTS Nextcloud
|
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
|
|
|
# Nextcloud Push
|
|
location ^~ /push/ {
|
|
proxy_pass http://nextcloud:7867/;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_read_timeout 3600;
|
|
proxy_send_timeout 3600;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://nextcloud:8080; # o :80 se rete del container
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
proxy_set_header X-Forwarded-Ssl on;
|
|
|
|
proxy_redirect off;
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
proxy_max_temp_file_size 0;
|
|
|
|
proxy_read_timeout 3600;
|
|
proxy_send_timeout 3600;
|
|
}
|
|
|
|
location = /.well-known/carddav {
|
|
return 301 https://$http_host/remote.php/dav;
|
|
}
|
|
|
|
location = /.well-known/caldav {
|
|
return 301 https://$http_host/remote.php/dav;
|
|
}
|
|
|
|
location = /.well-known/webfinger {
|
|
return 301 https://$http_host/index.php/.well-known/webfinger;
|
|
}
|
|
|
|
location = /.well-known/nodeinfo {
|
|
return 301 https://$http_host/index.php/.well-known/nodeinfo;
|
|
}
|
|
} |