diff options
| author | Jason McCormick <jason@mfamily.org> | 2026-11-02 20:42:45 -0500 |
|---|---|---|
| committer | Jason McCormick <jason@mfamily.org> | 2026-11-02 20:42:45 -0500 |
| commit | c333e4c76d42dc5c813a52b22fbe5328304a8ae8 (patch) | |
| tree | a8b582bdbce3097947395f4c8a289ee0b3ddb347 /README.md | |
| parent | 2474f6cade62ba937ff714f0aa54555f7ebc18d8 (diff) | |
updates for prod
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -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"; } } ``` |
