mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-23 11:08:13 -05:00
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
server {
|
|
listen 7001 default_server;
|
|
listen [::]:7001 default_server;
|
|
|
|
root /www/public/;
|
|
index index.html index.htm;
|
|
|
|
server_name _;
|
|
|
|
# 开启 brotli 压缩
|
|
brotli on;
|
|
brotli_static on;
|
|
brotli_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
# 开启 gzip 压缩
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
location ~* \.(jpg|jpeg|png|gif|js|css|svg|woff2|woff|ttf|eot|wasm|json|ico|html|htm)$ {
|
|
}
|
|
|
|
location ~ .* {
|
|
proxy_pass http://127.0.0.1:7010;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Real-PORT $remote_port;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Scheme $scheme;
|
|
proxy_set_header Server-Protocol $server_protocol;
|
|
proxy_set_header Server-Name $server_name;
|
|
proxy_set_header Server-Addr $server_addr;
|
|
proxy_set_header Server-Port $server_port;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
} |