mirror of
https://github.com/bashclub/zamba-lxc-toolbox
synced 2025-10-03 00:36:17 +00:00
Rename nextcloud.conf to nextcloud-for-mailcow-dockerized.conf
This is an Example for Nextcloud Upstream with Mailcow Dockerized as Reverse Proxy
This commit is contained in:
44
scripts/nextcloud-for-mailcow-dockerized.conf
Normal file
44
scripts/nextcloud-for-mailcow-dockerized.conf
Normal file
@@ -0,0 +1,44 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name cloud.domain.tld;
|
||||
|
||||
ssl_certificate /etc/ssl/mail/cert.pem;
|
||||
ssl_certificate_key /etc/ssl/mail/key.pem;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# HTTP → HTTPS
|
||||
if ($scheme = http) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass https://nc.sysops.de;
|
||||
|
||||
# Hostname & Forwarded-Header sauber durchreichen
|
||||
proxy_set_header Host 192.168.178.253; # explizit der Upstream-Name
|
||||
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 https; # TLS endet hier
|
||||
proxy_set_header X-Forwarded-Host $host; # also cloud.sysops.de
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
proxy_set_header Forwarded "for=$remote_addr;proto=https;host=$host";
|
||||
proxy_set_header Referrer-Policy "no-referrer";
|
||||
|
||||
proxy_connect_timeout 600;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
client_max_body_size 10G;
|
||||
}
|
||||
|
||||
# CalDAV/CardDAV Redirects
|
||||
location /.well-known/carddav { return 301 https://$host/remote.php/dav; }
|
||||
location /.well-known/caldav { return 301 https://$host/remote.php/dav; }
|
||||
}
|
Reference in New Issue
Block a user