-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.conf
43 lines (33 loc) · 1.15 KB
/
template.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
server {{
listen 80;
server_name {subdomain}.{domain} www.{subdomain}.{domain};
rewrite_log on;
error_log /web/sites/kinside/{subdomain}.{domain}/logs/error.log;
access_log /web/sites/kinside/{subdomain}.{domain}/logs/access.log;
location / {{
return 301 https://$host$request_uri;
}}
}}
server {{
listen 443 ssl http2;
server_name {subdomain}.{domain} www.{subdomain}.{domain};
root http://localhost:81;
index index.html;
ssl_certificate /etc/nginx/certs/{subdomain}.{domain}.crt;
ssl_certificate_key /etc/nginx/certs/{subdomain}.{domain}.key;
error_log /web/sites/kinside/{subdomain}.{domain}/logs/error.log;
access_log /web/sites/kinside/{subdomain}.{domain}/logs/access.log;
location / {{
proxy_pass http://localhost:81/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect default;
}}
# location ~* \.(js|jpg|jpeg|gif|png|webp|avif|css|pdf|bmp|ico|woff2|woff|svg)$ {{
# expires 1y;
# add_header Cache-Control "must-revalidate, public, max-age=31536000";
# }}
}}