Mercurial Hosting > luan
changeset 2168:c26aca3d2f76 default tip
use try_files, again
| author | Violet7 |
|---|---|
| date | Sat, 14 Feb 2026 00:41:06 -0800 |
| parents | 1f384f9acb1c |
| children | |
| files | host/startup/nginx/nginx.conf.luan src/luan/host/Https.luan |
| diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/host/startup/nginx/nginx.conf.luan Sun Feb 08 14:42:01 2026 -0800 +++ b/host/startup/nginx/nginx.conf.luan Sat Feb 14 00:41:06 2026 -0800 @@ -31,7 +31,7 @@ # $host/ssl does not exist for non-ssl sites and requests to here # will fail with 404 for those sites, which is what we want alias <%=rootDir%>/sites/$host/ssl/acme-challenge/; - autoindex on; + try_files $uri $uri/ =404; } }
--- a/src/luan/host/Https.luan Sun Feb 08 14:42:01 2026 -0800 +++ b/src/luan/host/Https.luan Sat Feb 14 00:41:06 2026 -0800 @@ -84,7 +84,7 @@ location /.well-known/acme-challenge/ { alias <%= files.acme_challenges.canonical().to_string() %>/; - autoindex on; + try_files $uri $uri/ =404; } } @@ -97,6 +97,12 @@ return 301 http://$http_host$request_uri; } + # just in case + location /.well-known/acme-challenge/ { + alias <%= files.acme_challenges.canonical().to_string() %>/; + try_files $uri $uri/ =404; + } + ssl_certificate <%= files.local_cer_file.canonical().to_string() %>; ssl_certificate_key <%= files.key_file.canonical().to_string() %>; include <%= nginx_default_conf.canonical().to_string() %>;
