annotate host/startup/nginx/nginx.ssl.conf.luan @ 2090:639441abad7b ssltesting

revert to using site/DOMAIN instead of site/DOMAIN/ssl
author Violet7
date Thu, 11 Dec 2025 20:28:38 -0800
parents c35179c79298
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;
2085
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
8
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
9 location / {
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
10 return 301 https://$http_host$request_uri;
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
11 }
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
12
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
13 location /.well-known/acme-challenge/ {
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
14 alias <%=rootDir%>/sites/$host/acme-challenge/;
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
15 autoindex on;
c35179c79298 alias <%=rootDir%>/sites/$host/acme-challenge/
Franklin Schmidt <fschmidt@gmail.com>
parents: 2080
diff changeset
16 }
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
17 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
18
0344a535b1db add doc
fffilimonov
parents:
diff changeset
19 server {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
20 server_name <%=domain%>;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
21 listen 443 ssl;
1776
da85925fea9c listen ipv6
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1727
diff changeset
22 listen [::]:443 ssl;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
23
0344a535b1db add doc
fffilimonov
parents:
diff changeset
24 if ($host != $server_name) {
0344a535b1db add doc
fffilimonov
parents:
diff changeset
25 return 301 http://$http_host$request_uri;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
26 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
27
2090
639441abad7b revert to using site/DOMAIN instead of site/DOMAIN/ssl
Violet7
parents: 2085
diff changeset
28 ssl_certificate <%=rootDir%>/sites/<%=domain%>/fullchain.cer;
639441abad7b revert to using site/DOMAIN instead of site/DOMAIN/ssl
Violet7
parents: 2085
diff changeset
29 ssl_certificate_key <%=rootDir%>/sites/<%=domain%>/<%=domain%>.key;
1727
63ab02188e9d change priority
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1726
diff changeset
30 include <%=rootDir%>/sites/<%=domain%>/site/nginx.*.conf;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
31 include <%=rootDir%>/local/nginx.default.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
32 }
0344a535b1db add doc
fffilimonov
parents:
diff changeset
33 <%