-
Notifications
You must be signed in to change notification settings - Fork 89
/
infomate.club.conf
62 lines (49 loc) · 1.91 KB
/
infomate.club.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
server {
listen 80;
listen 443 ssl http2;
server_name www.infomate.club;
ssl_certificate /home/vas3k/certs/infomate.club.cert.pem;
ssl_certificate_key /home/vas3k/certs/infomate.club.key.pem;
rewrite ^(.*) https://infomate.club$1 permanent;
}
server {
listen 80;
server_name infomate.club;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name infomate.club;
charset utf-8;
client_max_body_size 30M;
index index.html index.htm;
ssl_certificate /home/vas3k/certs/infomate.club.cert.pem;
ssl_certificate_key /home/vas3k/certs/infomate.club.key.pem;
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Real-IP;
real_ip_recursive on;
resolver 8.8.8.8;
rewrite ^/favicon.ico$ https://infomate.club/static/images/favicon/favicon.ico;
rewrite ^/favicon.png$ https://infomate.club/static/images/favicon/favicon-32x32.png;
location /static/ {
root /home/vas3k/infomate.club/;
gzip_static on;
expires max;
add_header Cache-Control "public";
}
location / {
add_header "Access-Control-Allow-Origin" "*";
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS";
add_header "Access-Control-Allow-Headers" "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range";
add_header "Access-Control-Expose-Headers" "Content-Length,Content-Range";
add_header "Strict-Transport-Security" "max-age=31536000;includeSubDomains";
add_header "X-Content-Type-Options" "nosniff";
add_header "Referrer-Policy" "strict-origin-when-cross-origin";
proxy_set_header "Host" $http_host;
proxy_set_header "X-Forwarded-For" $proxy_add_x_forwarded_for;
proxy_set_header "X-Forwarded-Proto" $scheme;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://127.0.0.1:8816;
}
}