view host/startup/nginx/nginx.ssl.conf.luan @ 1807:ffa28e2155bb

add line_diff
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 12 May 2024 15:25:29 -0600
parents da85925fea9c
children
line wrap: on
line source

local rootDir, domain = ...

%>
	server {
		server_name <%=domain%>;
		listen 80;
		listen [::]:80;
		return 301 https://$http_host$request_uri;
	}

	server {
		server_name <%=domain%>;
		listen 443 ssl;
		listen [::]:443 ssl;

		if ($host != $server_name) {
			return 301 http://$http_host$request_uri;
		}

		ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer;
		ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key;
		include <%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
		include <%=rootDir%>/local/nginx.default.conf;
	}
<%