view host/startup/nginx/nginx.ssl.conf.luan @ 1725:39af1c737191

use custom nginx conf for ssl
author Vadim Filimonov <fffilimonov@yandex.ru>
date Thu, 11 Aug 2022 12:34:29 +0200
parents 0344a535b1db
children b5baa841ea1b
line wrap: on
line source

local rootDir, domain = ...

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

	server {
		server_name <%=domain%>;
		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%>/local/nginx.default.conf;
		<%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
	}
<%