Mercurial Hosting > luan
comparison host/startup/nginx.ssl.conf.luan @ 1630:b735ed134662
add nginx and ssl for host
author | fffilimonov |
---|---|
date | Fri, 10 Dec 2021 17:08:17 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1629:124887e02dab | 1630:b735ed134662 |
---|---|
1 local rootDir, domain = ... | |
2 | |
3 %> | |
4 server { | |
5 server_name <%=domain%>; | |
6 listen 80; | |
7 return 301 https://$http_host$request_uri; | |
8 } | |
9 | |
10 server { | |
11 server_name <%=domain%>; | |
12 listen 443 ssl; | |
13 | |
14 if ($host != $server_name) { | |
15 return 301 http://$http_host$request_uri; | |
16 } | |
17 | |
18 ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer; | |
19 ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key; | |
20 include <%=rootDir%>/local/nginx.default.conf; | |
21 } | |
22 <% |