aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 17 insertions, 3 deletions
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";
}
}
```