annotate host/startup/nginx/nginx.ssl.conf.luan @ 1703:3a61451f8130

add bbcode video
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 Jul 2022 00:12:05 -0600
parents 0344a535b1db
children 39af1c737191
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;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
20 include <%=rootDir%>/local/nginx.default.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
21 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
22 <%