Mercurial Hosting > hghosting
diff nginx.ssl.conf.luan @ 0:dfc36e7ed22c
init
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Thu, 12 May 2022 13:51:59 +0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nginx.ssl.conf.luan Thu May 12 13:51:59 2022 +0400 @@ -0,0 +1,24 @@ +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%>/local/ssl/<%=domain%>/fullchain.cer; + ssl_certificate_key <%=rootDir%>/local/ssl/<%=domain%>/<%=domain%>.key; + include <%=rootDir%>/nginx.default.conf; + include <%=rootDir%>/config/nginx.custom.*.conf; + include <%=rootDir%>/config/nginx.conf; + } +<%