annotate nginx.ssl.conf.luan @ 18:64eee582fec1

add move logs while restart
author Vadim Filimonov <fffilimonov@yandex.ru>
date Wed, 19 Jun 2024 11:45:10 +0300
parents dfc36e7ed22c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 local rootDir, domain = ...
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 %>
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4 server {
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 server_name <%=domain%>;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6 listen 80;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 return 301 https://$http_host$request_uri;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 }
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10 server {
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 server_name <%=domain%>;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 listen 443 ssl;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 if ($host != $server_name) {
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 return 301 http://$http_host$request_uri;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 }
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
18 ssl_certificate <%=rootDir%>/local/ssl/<%=domain%>/fullchain.cer;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
19 ssl_certificate_key <%=rootDir%>/local/ssl/<%=domain%>/<%=domain%>.key;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
20 include <%=rootDir%>/nginx.default.conf;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
21 include <%=rootDir%>/config/nginx.custom.*.conf;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
22 include <%=rootDir%>/config/nginx.conf;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
23 }
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
24 <%