forked from OpenSourceArk/infomate.club
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
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;
|
|
|
|
access_log /home/vas3k/infomate.club/logs/access.log;
|
|
error_log /home/vas3k/infomate.club/logs/error.log;
|
|
|
|
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;
|
|
}
|
|
}
|