From a3b99ddf78fe0d2f6140faf5c18dbc04fc1c7f95 Mon Sep 17 00:00:00 2001 From: Zoey Date: Thu, 27 Aug 2026 22:59:56 +0200 Subject: [PATCH 1/7] improve nginx example I know many changes, if I should explain something more, just ask Signed-off-by: Zoey --- reverse-proxy.md | 110 +++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index ccafc834..6e5e2fdf 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -480,9 +480,21 @@ Add the below template to your Nginx config. **Note:** please check your Nginx version by running: `nginx -v` and adjust the lines marked with version notes to fit your version. ``` +#quic_bpf on; # improves HTTP/3 / QUIC - supported on nginx v1.25.0+, if nginx runs as a docker container you need to give it the BPF, PERFMON and NET_ADMIN caps - breaks nginx config reloads - needs to be set in the main nginx config block (outside location, server and http block) +``` +``` +pcre_jit on; +worker_processes auto; +worker_cpu_affinity auto; + map $http_upgrade $connection_upgrade { default upgrade; - '' close; + "" ""; +} + +upstream nextcloud { + #keepalive 32 local; # for nginx versions below v1.29.7 + server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below } server { @@ -496,74 +508,68 @@ server { return 301 https://$host$request_uri; } - listen 443 ssl http2; # for nginx versions below v1.25.1 - listen [::]:443 ssl http2; # for nginx versions below v1.25.1 - comment to disable IPv6 + listen 443 ssl; # for nginx v1.25.1+ + listen [::]:443 ssl; # for nginx v1.25.1+ - comment to disable IPv6 + http2 on; # for nginx v1.25.1+ - # listen 443 ssl; # for nginx v1.25.1+ - # listen [::]:443 ssl; # for nginx v1.25.1+ - keep comment to disable IPv6 - # http2 on; # uncomment to enable HTTP/2 - supported on nginx v1.25.1+ + #listen 443 ssl http2; # for nginx versions below v1.25.1 + #listen [::]:443 ssl http2; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - # listen 443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - # listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - keep comment to disable IPv6 - # http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - # quic_gso on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - # quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - # quic_bpf on; # improves HTTP/3 / QUIC - supported on nginx v1.25.0+, if nginx runs as a docker container you need to give it privileged permission to use this option - # add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - - proxy_buffering off; - proxy_request_buffering off; - - client_max_body_size 0; - client_body_buffer_size 512k; - # http3_stream_buffer_size 512k; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - - # The default NEXTCLOUD_MAX_TIME value is 3600 seconds. - # By setting it 10 seconds higher than that, we make sure that always Nextcloud times out and not NGINX. - # If you increased NEXTCLOUD_MAX_TIME, increase the timeout below accordingly. - proxy_read_timeout 3610s; + #listen 443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport + #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - keep comment to disable IPv6 + #http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ + #quic_gso on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - broken for connections over wireguard tunnels + #quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ + #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ + client_body_buffer_size 1m; + #http3_stream_buffer_size 1m; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ server_name ; - location / { - proxy_pass http://127.0.0.1:11000$request_uri; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below - - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Port $server_port; - proxy_set_header X-Forwarded-Scheme $scheme; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - proxy_set_header Early-Data $ssl_early_data; - - # Websocket - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - } - # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine, # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. # In this case the subdomain should already be secured without additional actions ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine - ssl_dhparam /etc/dhparam; # curl -L https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/dhparam + proxy_buffering off; + proxy_request_buffering off; + proxy_socket_keepalive on; - ssl_early_data on; - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:10m; + # The default NEXTCLOUD_MAX_TIME value is 3600 seconds. + # By setting it 10 seconds higher than that, we make sure that always Nextcloud times out and not NGINX. + # If you increased NEXTCLOUD_MAX_TIME, increase the timeout below accordingly. + proxy_read_timeout 3610s; + + location / { + proxy_pass http://nextcloud; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # Websockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + } ssl_protocols TLSv1.2 TLSv1.3; - ssl_ecdh_curve x25519:x448:secp521r1:secp384r1:secp256r1; + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256; + ssl_session_timeout 1d; + ssl_session_cache shared:HTTPS:10m; - ssl_prefer_server_ciphers on; - ssl_conf_command Options PrioritizeChaCha; - ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256; + sendfile on; + aio threads; + aio_write on; + tcp_nopush on; + tcp_nodelay on; + client_max_body_size 0; + reset_timedout_connection on; } - ``` ⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration. From ebba537b4fa09a4e0511ad4a77984fab2964e3a8 Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 29 Aug 2026 17:38:05 +0200 Subject: [PATCH 2/7] adjust nginx reverse proxy example Signed-off-by: Zoey --- reverse-proxy.md | 165 +++++++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 78 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 6e5e2fdf..3f95af8d 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -480,95 +480,104 @@ Add the below template to your Nginx config. **Note:** please check your Nginx version by running: `nginx -v` and adjust the lines marked with version notes to fit your version. ``` +pcre_jit on; # needs to be set in the main nginx config block (outside location, server and http block) +worker_processes auto; # needs to be set in the main nginx config block (outside location, server and http block) +worker_cpu_affinity auto; # needs to be set in the main nginx config block (outside location, server and http block) + #quic_bpf on; # improves HTTP/3 / QUIC - supported on nginx v1.25.0+, if nginx runs as a docker container you need to give it the BPF, PERFMON and NET_ADMIN caps - breaks nginx config reloads - needs to be set in the main nginx config block (outside location, server and http block) -``` -``` -pcre_jit on; -worker_processes auto; -worker_cpu_affinity auto; -map $http_upgrade $connection_upgrade { - default upgrade; - "" ""; -} +http { + sendfile on; + aio threads; + aio_write on; + tcp_nopush on; + tcp_nodelay on; + server_tokens off; + reset_timedout_connection on; -upstream nextcloud { - #keepalive 32 local; # for nginx versions below v1.29.7 - server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below -} + # uncomment and set the trusted IPs if a second reverse proxy (or cloudflare) runs in front of nginx + #real_ip_recursive on; + #real_ip_header X-Forwarded-For; + #set_real_ip_from unix:; + #set_real_ip_from 127.0.0.0/8; + #set_real_ip_from ::1/128; + #set_real_ip_from ...; -server { - listen 80; - listen [::]:80; # comment to disable IPv6 - - if ($scheme = "http") { - return 301 https://$host$request_uri; - } - if ($http_x_forwarded_proto = "http") { - return 301 https://$host$request_uri; - } - - listen 443 ssl; # for nginx v1.25.1+ - listen [::]:443 ssl; # for nginx v1.25.1+ - comment to disable IPv6 - http2 on; # for nginx v1.25.1+ - - #listen 443 ssl http2; # for nginx versions below v1.25.1 - #listen [::]:443 ssl http2; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - - #listen 443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - keep comment to disable IPv6 - #http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - #quic_gso on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - broken for connections over wireguard tunnels - #quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - - client_body_buffer_size 1m; + http2 on; # for nginx v1.25.1+ + #http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ + #quic_gso on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - broken for connections over wireguard tunnels + #quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ #http3_stream_buffer_size 1m; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - - server_name ; - - # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine, - # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. - # In this case the subdomain should already be secured without additional actions - ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine - ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine - - proxy_buffering off; - proxy_request_buffering off; - proxy_socket_keepalive on; - - # The default NEXTCLOUD_MAX_TIME value is 3600 seconds. - # By setting it 10 seconds higher than that, we make sure that always Nextcloud times out and not NGINX. - # If you increased NEXTCLOUD_MAX_TIME, increase the timeout below accordingly. - proxy_read_timeout 3610s; - - location / { - proxy_pass http://nextcloud; - - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # Websockets - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - } + client_body_buffer_size 1m; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256; ssl_session_timeout 1d; ssl_session_cache shared:HTTPS:10m; - sendfile on; - aio threads; - aio_write on; - tcp_nopush on; - tcp_nodelay on; - client_max_body_size 0; - reset_timedout_connection on; + map $http_upgrade $connection_upgrade { + default upgrade; + "" ""; + } + + upstream nextcloud { + keepalive 32 local; # for nginx versions below v1.29.7 + server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below + } + + server { + listen 0.0.0.0:80 bind reuseport deferred multipath so_keepalive=on; # please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen [::]:80 bind reuseport deferred multipath so_keepalive=on; # comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on these options ip and port with this enabled + + if ($scheme = "http") { + return 301 https://$host$request_uri; + } + if ($http_x_forwarded_proto = "http") { + return 301 https://$host$request_uri; + } + + listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + + #listen 0.0.0.0:443 ssl http2 bind reuseport deferred multipath so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen [::]:443 ssl http2 bind reuseport deferred multipath so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + + #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled + #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled reuseport - keep comment to disable IPv6 + #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ + + server_name ; + + # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine, + # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. + # In this case the subdomain should already be secured without additional actions + ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine + + proxy_buffering off; + proxy_request_buffering off; + proxy_socket_keepalive on; + client_max_body_size 0; + + # The default NEXTCLOUD_MAX_TIME value is 3600 seconds. + # By setting it 10 seconds higher than that, we make sure that always Nextcloud times out and not NGINX. + # If you increased NEXTCLOUD_MAX_TIME, increase the timeout below accordingly. + proxy_read_timeout 3610s; + + location / { + proxy_pass http://nextcloud; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # Websockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + } } ``` From cc7a806eac5540c0e4db58bbec4a16ce37e51658 Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 2 Sep 2026 17:25:03 +0200 Subject: [PATCH 3/7] Update reverse-proxy.md Signed-off-by: Zoey --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 3f95af8d..a3ba0f08 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -521,7 +521,7 @@ http { } upstream nextcloud { - keepalive 32 local; # for nginx versions below v1.29.7 + keepalive 32; # for nginx versions below v1.29.7 server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below } From 979c67dc731248f45a20cc33802a4012a4fbd52b Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 2 Sep 2026 17:27:30 +0200 Subject: [PATCH 4/7] fix grammar Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zoey --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index a3ba0f08..fe3214cd 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -548,7 +548,7 @@ http { server_name ; - # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine, + # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has a wildcard ssl certificate from certbot on this machine, # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. # In this case the subdomain should already be secured without additional actions ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine From 6ea37e9d2b76efe8ec2616e8bc41f79190ec3bda Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 2 Sep 2026 17:31:42 +0200 Subject: [PATCH 5/7] mention that multipath only works on 1.29.7+ Signed-off-by: Zoey --- reverse-proxy.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index fe3214cd..c5092786 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -526,8 +526,11 @@ http { } server { - listen 0.0.0.0:80 bind reuseport deferred multipath so_keepalive=on; # please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - listen [::]:80 bind reuseport deferred multipath so_keepalive=on; # comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on these options ip and port with this enabled + listen 0.0.0.0:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen [::]:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on these options ip and port with this enabled + + #listen 0.0.0.0:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen [::]:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on these options ip and port with this enabled if ($scheme = "http") { return 301 https://$host$request_uri; @@ -536,13 +539,16 @@ http { return 301 https://$host$request_uri; } - listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen 0.0.0.0:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen [::]:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen 0.0.0.0:443 ssl http2 bind reuseport deferred multipath so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen [::]:443 ssl http2 bind reuseport deferred multipath so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled + #listen 0.0.0.0:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen [::]:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + + #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled reuseport - keep comment to disable IPv6 #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ From 01e652f3dc56a14bb6ea4e047989f74f1ba1825f Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 2 Sep 2026 17:35:01 +0200 Subject: [PATCH 6/7] adjust wording Signed-off-by: Zoey --- reverse-proxy.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index c5092786..5d597c33 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -526,12 +526,11 @@ http { } server { - listen 0.0.0.0:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled - listen [::]:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on these options ip and port with this enabled - - #listen 0.0.0.0:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen [::]:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on these options ip and port with this enabled + listen 0.0.0.0:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options + listen [::]:80 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.29.7 - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options + #listen 0.0.0.0:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if another listener on the same IP:port already uses these options + #listen [::]:80 bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - keep comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if another listener on the same IP:port already uses these options if ($scheme = "http") { return 301 https://$host$request_uri; } @@ -539,17 +538,17 @@ http { return 301 https://$host$request_uri; } - listen 0.0.0.0:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled - listen [::]:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + listen 0.0.0.0:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options + listen [::]:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options - #listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on"if another listener on the same IP:port already uses these options + #listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - keep comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if another listener on the same IP:port already uses these options - #listen 0.0.0.0:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled - #listen [::]:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if there is already another listener on this ip and port with these options enabled + #listen 0.0.0.0:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options + #listen [::]:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options - #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled - #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on this ip and port 443 with this enabled reuseport - keep comment to disable IPv6 + #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if another quic listener on the same IP:port already uses these options + #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - keep comment to disable IPv6 - please remove "reuseport "if another quic listener on the same IP:port already uses these optionst #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ server_name ; From 55b47e236c9bc57dcda7a415ee1372987898bb2d Mon Sep 17 00:00:00 2001 From: Zoey Date: Mon, 7 Sep 2026 11:41:58 +0200 Subject: [PATCH 7/7] small fixes Signed-off-by: Zoey --- reverse-proxy.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 5d597c33..5094de45 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -238,8 +238,8 @@ Add this as a new Apache site config: SSLHonorCipherOrder off SSLSessionTickets off - # If running apache on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine, - # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. + # If running apache on a subdomain (eg. nextcloud.example.com) of a domain that already has a wildcard ssl certificate from certbot on this machine, + # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. # In this case the subdomain should already be secured without additional actions SSLCertificateFile /etc/letsencrypt/live//fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live//privkey.pem @@ -521,8 +521,8 @@ http { } upstream nextcloud { - keepalive 32; # for nginx versions below v1.29.7 - server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below + keepalive 32; # for nginx versions below v1.29.7 + server 127.0.0.1:11000; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below } server { @@ -541,20 +541,20 @@ http { listen 0.0.0.0:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options listen [::]:443 ssl bind reuseport deferred so_keepalive=on; # for nginx v1.25.1+ - comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options - #listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on"if another listener on the same IP:port already uses these options + #listen 0.0.0.0:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - please remove "bind reuseport deferred multipath so_keepalive=on" if another listener on the same IP:port already uses these options #listen [::]:443 ssl bind reuseport deferred multipath so_keepalive=on; # for nginx v1.29.7+ - keep comment to disable IPv6 - please remove "bind reuseport deferred multipath so_keepalive=on" if another listener on the same IP:port already uses these options #listen 0.0.0.0:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options #listen [::]:443 ssl http2 bind reuseport deferred so_keepalive=on; # for nginx versions below v1.25.1 - keep comment to disable IPv6 - please remove "bind reuseport deferred so_keepalive=on" if another listener on the same IP:port already uses these options - #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if another quic listener on the same IP:port already uses these options - #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - keep comment to disable IPv6 - please remove "reuseport "if another quic listener on the same IP:port already uses these optionst + #listen 0.0.0.0:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if another quic listener on the same IP:port already uses this option + #listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - keep comment to disable IPv6 - please remove "reuseport" if another quic listener on the same IP:port already uses this option #add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ server_name ; - # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has a wildcard ssl certificate from certbot on this machine, - # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. + # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has a wildcard ssl certificate from certbot on this machine, + # the in the below lines should be replaced with just the domain (eg. example.com), not the subdomain. # In this case the subdomain should already be secured without additional actions ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine @@ -583,6 +583,7 @@ http { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } + } } ```