annotate host/startup/nginx/nginx.ssl.conf.luan @ 1760:13da09b5b13b

merge
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 10 Apr 2023 17:46:41 -0600
parents 63ab02188e9d
children da85925fea9c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
1 local rootDir, domain = ...
0344a535b1db add doc
fffilimonov
parents:
diff changeset
2
0344a535b1db add doc
fffilimonov
parents:
diff changeset
3 %>
0344a535b1db add doc
fffilimonov
parents:
diff changeset
4 server {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
5 server_name <%=domain%>;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
6 listen 80;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
7 return 301 https://$http_host$request_uri;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
8 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
9
0344a535b1db add doc
fffilimonov
parents:
diff changeset
10 server {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
11 server_name <%=domain%>;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
12 listen 443 ssl;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
13
0344a535b1db add doc
fffilimonov
parents:
diff changeset
14 if ($host != $server_name) {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
15 return 301 http://$http_host$request_uri;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
16 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
17
0344a535b1db add doc
fffilimonov
parents:
diff changeset
18 ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
19 ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key;
1727
63ab02188e9d change priority
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1726
diff changeset
20 include <%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
21 include <%=rootDir%>/local/nginx.default.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
22 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
23 <%