lab-ansible/roles/apps/templates/nginx/conf.d/nextcloud.conf.j2
2024-01-01 16:33:52 +01:00

32 lines
877 B
Django/Jinja

{# code: language=ansible-jinja #}
# THIS FILE IS MANAGED BY ANSIBLE
server {
listen 8080;
server_name {{ apps_vars.nextcloud.domain }};
location / {
resolver 127.0.0.11 valid=30s;
set $upstream http://nextcloud:80;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# Options required by Nextcloud
proxy_read_timeout 86400s;
client_body_buffer_size 512k;
client_max_body_size 0;
}
location ~^/\.well-known/(cal|card)dav$ {
return 301 https://$host/remote.php/dav;
}
}