view host/startup/nginx/nginx.acme_setup.conf.luan @ 2085:c35179c79298 ssltesting

alias <%=rootDir%>/sites/$host/acme-challenge/
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 10 Dec 2025 11:44:41 -0700
parents 39d4215259ec
children
line wrap: on
line source

local rootDir, domain = ...

%>
	# This config exists to serve up acme challenges on
	# .well-known for initial domain verification by letsencrypt.
	# see set_https in luan/src/luan/host/https.luan for more.
	server {
		server_name <%=domain%>;
		listen 80;
		listen [::]:80;

		error_log <%=rootDir%>/error.log;
		access_log <%=rootDir%>/access.log;

		# this directive should be included in a per-site
		# nginx conf. this only exists for nginx.ssl.conf
		# as far as I am aware. Currently, this will cause
		# conflict with the server block defined in that
		# file, so this file should be deleted when the
		# initial setup is finished, and this directive
		# should be added to that file instead.
		location /.well-known/acme-challenge/ {
				root <%=rootDir%>;
				try_files $uri $uri/ =404;
		}

		include nginx.default.conf;

	}

<%