Commit graph

43 commits

Author SHA1 Message Date
524ad6e89b
nginx: SSE-friendly proxy_pass + unconditional $connection_upgrade map
Two coupled changes that let every proxy_pass vhost serve both WS and
SSE without per-vhost flags or template conditionals:

1) nginx.conf: $connection_upgrade map is now always defined (drop
   the % if has_websockets: gate), and the '' branch returns "" instead
   of "close". With "" + proxy_http_version 1.1, nginx maintains
   keep-alive to upstream for non-WS clients — which is what SSE
   requires. WS clients still get Connection: upgrade as before.

2) data/nginx/proxy_pass.conf: drop the % if websockets: conditional.
   Always set proxy_http_version 1.1 + Upgrade + Connection via the
   map, plus proxy_buffering off and proxy_read_timeout 1h for SSE.

Effects on existing vhosts:
- home.server's Proxmox WS vhost: unchanged behavior (the WS branch
  was already setting these headers). Gains the ability to also
  serve SSE if ever needed.
- All other proxy_pass vhosts (Nextcloud, Freescout, YOURLS, Gitea,
  etc.): get keep-alive to upstream (minor latency win) and unbuffered
  pass-through (slight throughput cost on huge responses, neutral
  for typical web app traffic).

Dead but harmless: bundles/nginx/metadata.py still defaults
nginx/has_websockets to False, and proxmox-ve/grafana still set it
to True. The flag is now a no-op; clean up in a separate pass.
2026-05-10 22:12:03 +02:00
6f2073847d
nginx/README: how port 80 is served + vm/cores requirement
Two things from the left4me-integration session worth pinning:

- 80.conf was orphaned in sites/ (not sites-enabled/) for an
  unknown amount of time. Commit d49259f moved it; document the
  resulting wiring so it's not re-broken accidentally.
- items.py reads node.metadata.get('vm/cores') with no default
  for worker_processes; bare-metal nodes outside the vm group
  raise at item-build time. Cost the agent ~10 min when
  ovh.left4me first opted into webserver.

Also note the cross-namespace read on letsencrypt/domains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:47:47 +02:00
d49259ff07
nginx: move 80.conf to sites-available so it's actually included
The bundle was shipping 80.conf (HTTP-to-HTTPS redirect + acme-challenge
alias) to /etc/nginx/sites/80.conf, but nginx.conf only `include`s
/etc/nginx/sites-enabled/* (which is a symlink to sites-available).
The file was orphaned — no node had a working port-80 listener.

Move the destination to /etc/nginx/sites-available/80.conf so the
existing sites-enabled symlink picks it up. The /etc/nginx purge will
clean up any stale /etc/nginx/sites/80.conf on existing hosts.
2026-05-10 19:59:17 +02:00
1d8f20ff25
yurlls fix monitoring and use dehydrated certs 2025-06-29 14:46:39 +02:00
9e139fd422
fix remove leftover 2025-06-22 10:03:38 +02:00
187b0440c8
nginx use expected dirs and allow websockets in proxy pass 2025-06-22 09:49:27 +02:00
a3ba06bcb0
pipes -> shlex 2024-11-23 09:52:58 +01:00
28e9d69571
nginx fix ssl_dhparam path 2024-06-11 18:03:08 +02:00
d62e609863
faster better dhparams that actually get used 2024-06-05 21:34:28 +02:00
206e62e698
leftover 2023-12-21 11:24:56 +01:00
789897acf6
nginx: more managed, hopefully survives updates 2023-07-28 02:34:37 +02:00
b5d48db4dd
from debian 12 2023-07-28 01:35:15 +02:00
b2aadeb98c
home.server debian-12 2023-07-05 23:43:20 +02:00
0667304dd7
remove leftovers 2023-04-20 11:09:08 +02:00
367c134ecc
nginx Wants network-online.target 2023-01-31 18:48:43 +01:00
407318445d
nginx-rtmps 2022-12-05 16:26:50 +01:00
89e25b4ca3
remove network metadata from dummy nodes 2022-10-08 00:11:00 +02:00
addbae4b1d
start nginx when network is online 2022-10-06 14:34:21 +02:00
440f270b25
nginx check less noise 2022-09-13 00:42:57 +02:00
c64aa70b49
nftables 2022-09-09 19:50:42 +02:00
mwiegand
f3f624be1f monitoring stuff 2022-09-05 15:42:48 +02:00
mwiegand
78d2499b46 nginx http check uses GET 2022-09-05 15:02:07 +02:00
mwiegand
1e2e63405a bundles/nginx/metadata.pybasic http check 2022-09-05 13:48:54 +02:00
mwiegand
9ef958d935 new opanhab raspi 2021-11-10 01:25:48 +01:00
mwiegand
fdcfa8a82b letsencrypt dns challenge 2021-11-08 10:49:37 +01:00
mwiegand
bd7a9c644e wip 2021-10-09 15:18:15 +02:00
mwiegand
26a4b8cd80 wip 2021-10-09 15:01:45 +02:00
mwiegand
2d83675c64 wip 2021-08-16 18:06:58 +02:00
mwiegand
12ce4b20c2 wip 2021-07-08 10:14:33 +02:00
mwiegand
0d734655fe wip 2021-07-08 02:15:49 +02:00
mwiegand
9152574276 wip 2021-07-08 00:32:32 +02:00
mwiegand
e2eb7c067f wip 2021-07-07 01:18:20 +02:00
mwiegand
4150a3fb4d wip 2021-07-07 01:02:22 +02:00
mwiegand
1114c6d6a3 wip 2021-07-06 23:06:59 +02:00
mwiegand
b8127713d9 wip 2021-07-05 23:07:14 +02:00
mwiegand
a1e2101838 wip 2021-07-05 22:44:42 +02:00
mwiegand
a15bdfa95f wip 2021-07-05 22:42:42 +02:00
mwiegand
3a04293007 wip 2021-06-26 13:58:35 +02:00
mwiegand
f37e2d2fbd wip 2021-06-26 12:21:15 +02:00
mwiegand
f60108dee1 wip 2021-06-17 02:13:25 +02:00
mwiegand
a3caa8481e wip 2021-06-17 01:48:34 +02:00
mwiegand
72581c28ec wip 2021-06-14 01:31:45 +02:00
mwiegand
2ef06345eb wip 2021-06-13 15:40:33 +02:00