2020-03-07 03:35:25 +00:00
|
|
|
server {
|
|
|
|
listen 80 ;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
|
|
|
ssl_certificate /etc/nginx/cert/www.crt;
|
|
|
|
ssl_certificate_key /etc/nginx/cert/www.key;
|
|
|
|
|
|
|
|
root /var/www/html;
|
|
|
|
|
|
|
|
index index.html index.htm index.nginx-debian.html;
|
|
|
|
|
|
|
|
server_name www.zeekling.cn;
|
|
|
|
|
|
|
|
if ( $scheme = http ){
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
|
|
}
|
|
|
|
|
2020-04-19 10:48:06 +00:00
|
|
|
|
2020-03-07 03:35:25 +00:00
|
|
|
location / {
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
|
|
|
|
2020-06-06 15:21:26 +00:00
|
|
|
location ~ (.*)/cdn/(.*)$ {
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ .(jpg|png|gif|css|js|pdf|scss|ico|jpeg|bmp|flv|mp4|mp3|swf|wma|wmv|asf|mmf|zip|rar|gz|woff2|woff|ttf)$ {
|
2020-03-07 03:35:25 +00:00
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_cache cache_one;
|
|
|
|
proxy_cache_valid 200 302 30d;
|
|
|
|
proxy_cache_valid 301 30d;
|
|
|
|
proxy_cache_valid any 30d;
|
|
|
|
expires 30d;
|
|
|
|
proxy_redirect off;
|
|
|
|
add_header wall "Stay simple, stay naive.";
|
|
|
|
}
|
|
|
|
location /goaccess.html {
|
|
|
|
autoindex on;
|
|
|
|
}
|
2020-04-19 10:48:06 +00:00
|
|
|
location /4635f0aec58387682acba6c26244c4e4.html {
|
|
|
|
autoindex on;
|
|
|
|
}
|
2020-03-07 03:35:25 +00:00
|
|
|
|
|
|
|
location /robots.txt {
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
location /ByteDanceVerify.html {
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
location /ads.txt {
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
|
2020-04-19 10:48:06 +00:00
|
|
|
location /gogs/ {
|
|
|
|
rewrite ".*" https://git.zeekling.cn/$1;
|
|
|
|
}
|
|
|
|
|
2020-03-07 03:35:25 +00:00
|
|
|
}
|
|
|
|
|