From c333e4c76d42dc5c813a52b22fbe5328304a8ae8 Mon Sep 17 00:00:00 2001 From: Jason McCormick Date: Mon, 2 Nov 2026 20:42:45 -0500 Subject: updates for prod --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f168a18..3e1ffe8 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,10 @@ systemctl reload nginx ``` The nginx server block redirects HTTP to HTTPS, listens on IPv4 and IPv6, and -proxies only `/`: +proxies only `/`. It serves `/.well-known/` directly from `/var/www/html` for +ACME challenges. All service error bodies contain only the numeric status code +and a newline, never HTML; see the full configuration in +`deploy/ip.mfamily.org.nginx` for the error mappings: ``` server { @@ -128,7 +131,13 @@ server { listen [::]:80; server_name ip.mfamily.org; - return 301 https://$host$request_uri; + location ^~ /.well-known/ { + root /var/www/html; + } + + location / { + return 301 https://$host$request_uri; + } } server { @@ -139,16 +148,21 @@ server { ssl_certificate /etc/letsencrypt/live/ip.mfamily.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/ip.mfamily.org/privkey.pem; + location ^~ /.well-known/ { + root /var/www/html; + } + location = / { proxy_pass http://127.0.0.1:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass_request_body off; proxy_set_header Content-Length ""; + proxy_intercept_errors on; } location / { - return 404; + return 404 "404\n"; } } ``` -- cgit v1.2.3