| @@ -0,0 +1,33 @@ | |||
| 1 | + | # /etc/nginx/conf.d/nextcloud-http.conf | |
| 2 | + | # | |
| 3 | + | # Shared HTTP-context settings for all Nextcloud vhosts on this host | |
| 4 | + | # (box.meson.in, komeda.onni.me, nus.meson.in, ...). | |
| 5 | + | # | |
| 6 | + | # These are `map`/`upstream` blocks, which nginx only allows at the | |
| 7 | + | # http {} level -- they can NOT live inside a per-site server {} block, | |
| 8 | + | # so they can't be folded into nextcloud-common.conf below. This file | |
| 9 | + | # is picked up automatically by the distro's default | |
| 10 | + | # `include /etc/nginx/conf.d/*.conf;` line in nginx.conf, so nothing | |
| 11 | + | # else needs to reference it. | |
| 12 | + | ||
| 13 | + | # PHP-FPM pool shared by all Nextcloud sites. | |
| 14 | + | # If a site runs a different PHP version, override with its own | |
| 15 | + | # `upstream php-handler { ... }` inside that site's file INSTEAD of | |
| 16 | + | # using this one (an upstream name can only be defined once per | |
| 17 | + | # http {} block, so don't do both). | |
| 18 | + | upstream php-handler { | |
| 19 | + | server unix:/var/run/php/php8.4-fpm.sock; | |
| 20 | + | } | |
| 21 | + | ||
| 22 | + | # Set the `immutable` cache control option only for assets with a | |
| 23 | + | # cache-busting `v` argument. | |
| 24 | + | map $arg_v $asset_immutable { | |
| 25 | + | "" ""; | |
| 26 | + | default "immutable"; | |
| 27 | + | } | |
| 28 | + | ||
| 29 | + | # Skip access-log entries for successful/redirect responses. | |
| 30 | + | map $status $loggable { | |
| 31 | + | ~^[23] 0; | |
| 32 | + | default 1; | |
| 33 | + | } | |
meson / [TARDiS] upstream-map.conf
Last active 3 weeks ago
meson revised this gist 3 weeks ago · 82c9bdc
1 file changed, 33 insertions