changeset 2085:c35179c79298 ssltesting tip

alias <%=rootDir%>/sites/$host/acme-challenge/
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 10 Dec 2025 11:44:41 -0700
parents 9e0d28433e25
children
files host/startup/nginx/nginx.conf.luan host/startup/nginx/nginx.ssl.conf.luan
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/host/startup/nginx/nginx.conf.luan	Tue Dec 09 23:52:52 2025 -0800
+++ b/host/startup/nginx/nginx.conf.luan	Wed Dec 10 11:44:41 2025 -0700
@@ -25,6 +25,11 @@
 		listen 80 default_server;
 		listen [::]:80 default_server;
 		include nginx.default.conf;
+
+		location /.well-known/acme-challenge/ {
+			alias <%=rootDir%>/sites/$host/acme-challenge/;
+			autoindex on;
+		}
 	}
 
 	include <%=rootDir%>/sites/*/nginx.ssl.conf;
--- a/host/startup/nginx/nginx.ssl.conf.luan	Tue Dec 09 23:52:52 2025 -0800
+++ b/host/startup/nginx/nginx.ssl.conf.luan	Wed Dec 10 11:44:41 2025 -0700
@@ -5,7 +5,15 @@
 		server_name <%=domain%>;
 		listen 80;
 		listen [::]:80;
-		return 301 https://$http_host$request_uri;
+
+		location / {
+			return 301 https://$http_host$request_uri;
+		}
+
+		location /.well-known/acme-challenge/ {
+			alias <%=rootDir%>/sites/$host/acme-challenge/;
+			autoindex on;
+		}
 	}
 
 	server {