From e9a2076a9c8be630299918a6573aab331bea110e Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 18 May 2026 11:56:14 +0200 Subject: [PATCH] apache: revert some changes to nextcloud.conf Signed-off-by: Simon L. --- Containers/apache/nextcloud.conf | 37 ++------------------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 58773e44..968f8901 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -9,34 +9,6 @@ Listen 8000 ErrorLogFormat "[%t] [%l] [%E] [client: %{X-Forwarded-For}i] [%M] [%{User-Agent}i]" LogLevel ${AIO_LOG_LEVEL} - # KeepAlive On: allow the same TCP connection to carry multiple HTTP requests. - # Without this each asset (JS, CSS, image) would require a full TCP handshake, - # which is especially expensive on TLS connections and noticeably slows down - # Nextcloud's login page and file manager that load dozens of resources at once. - KeepAlive On - # KeepAliveTimeout: close an idle keep-alive connection after 5 seconds. - # A short timeout frees Apache worker threads quickly so they are available - # for new requests; 5 s is long enough to cover the gap between requests - # that a browser issues while rendering a page (typically < 1 s), yet short - # enough to avoid holding threads open for idle or slow clients. - KeepAliveTimeout 5 - # MaxKeepAliveRequests: allow at most 500 requests per persistent connection. - # 100 (the Apache default) is too low for Nextcloud: the desktop and mobile - # sync clients issue many small API calls (PROPFIND, GET, PUT, checksums …) - # per sync cycle and routinely exceed 100 requests on a single connection. - # Hitting the limit forces a new TCP/TLS handshake, adding latency and CPU - # overhead. 500 gives sync clients enough headroom while still periodically - # recycling threads to contain per-process memory growth. - MaxKeepAliveRequests 500 - - # sendfile(2) is disabled because it bypasses Apache's output-filter chain: with - # it enabled, mod_brotli is silently skipped for static files (JS, CSS, SVG), - # negating the compression configured below. MMAP is also - # disabled because files can be replaced by Nextcloud at any time and mmap'd - # pages could serve stale data. - EnableSendfile Off - EnableMMAP Off - # PHP match SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000" @@ -45,17 +17,12 @@ Listen 8000 - # Compress JS, CSS and SVG responses with Brotli (quality 4 gives good - # compression with reasonable CPU cost; the default of 0 barely compresses). + # Compress JS, CSS and SVG responses with Brotli. # Other plain-text files are already compressed by Nextcloud itself. - # No deflate fallback is needed: every browser that Nextcloud supports - # (Chrome 49+, Firefox 44+, Safari 11+, Edge 15+ — all from 2016-2017) - # supports Brotli. Internet Explorer, the only browser that never gained - # Brotli support, was dropped by Nextcloud with NC15 (2019). # Desktop and mobile sync clients never request JS/CSS/SVG assets. AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript text/css image/svg+xml - BrotliCompressionQuality 4 + BrotliCompressionQuality 0 # Nextcloud dir