cp nextcloud.subdomain.conf.sample nextcloud.subdomain.conf
nano nextcloud.subdomain.conf
The configuration should be modified to match the following one (check the sections between <>
):
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name <subdomain-name>.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app <server_ip-or-container_name>; # If you are using Azure VM server_ip=assigned internal IP of the VM (for example 10.0.0.4)
set $upstream_port 11000; # apache port of Nextcloud
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
# Hide proxy response headers from Nextcloud that conflict with ssl.conf
# Uncomment the Optional additional headers in SWAG's ssl.conf to pass Nextcloud's security scan
proxy_hide_header Referrer-Policy;
proxy_hide_header X-Content-Type-Options;
proxy_hide_header X-Frame-Options;
proxy_hide_header X-XSS-Protection;
# Disable proxy buffering
proxy_buffering off;
client_body_buffer_size 512k;
}
}