1632
|
1 local rootDir, domain = ...
|
|
2
|
|
3 %>
|
|
4 server {
|
|
5 server_name <%=domain%>;
|
|
6 listen 80;
|
1776
|
7 listen [::]:80;
|
1632
|
8 return 301 https://$http_host$request_uri;
|
|
9 }
|
|
10
|
|
11 server {
|
|
12 server_name <%=domain%>;
|
|
13 listen 443 ssl;
|
1776
|
14 listen [::]:443 ssl;
|
1632
|
15
|
|
16 if ($host != $server_name) {
|
|
17 return 301 http://$http_host$request_uri;
|
|
18 }
|
|
19
|
|
20 ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer;
|
|
21 ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key;
|
1727
|
22 include <%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
|
1632
|
23 include <%=rootDir%>/local/nginx.default.conf;
|
|
24 }
|
|
25 <%
|