annotate host/startup/nginx/nginx.ssl.conf.luan @ 1830:d72a52232f79

mail - minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 24 Sep 2024 17:17:57 -0600
parents da85925fea9c
children
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;
1776
da85925fea9c listen ipv6
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1727
diff changeset
7 listen [::]:80;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
8 return 301 https://$http_host$request_uri;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
9 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
10
0344a535b1db add doc
fffilimonov
parents:
diff changeset
11 server {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
12 server_name <%=domain%>;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
13 listen 443 ssl;
1776
da85925fea9c listen ipv6
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1727
diff changeset
14 listen [::]:443 ssl;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
15
0344a535b1db add doc
fffilimonov
parents:
diff changeset
16 if ($host != $server_name) {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
17 return 301 http://$http_host$request_uri;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
18 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
19
0344a535b1db add doc
fffilimonov
parents:
diff changeset
20 ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
21 ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key;
1727
63ab02188e9d change priority
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1726
diff changeset
22 include <%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
23 include <%=rootDir%>/local/nginx.default.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
24 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
25 <%