mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
upstream baseApi {
|
|
server 0.0.0.0:5600;
|
|
}
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default keep-alive;
|
|
'websocket' upgrade;
|
|
}
|
|
|
|
server {
|
|
IPV4_CONFIG
|
|
IPV6_CONFIG
|
|
ssl_session_timeout 5m;
|
|
|
|
location QL_BASE_URLapi/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://baseApi/api/;
|
|
proxy_buffering off;
|
|
proxy_redirect default;
|
|
proxy_connect_timeout 1800;
|
|
proxy_send_timeout 1800;
|
|
proxy_read_timeout 1800;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
location QL_BASE_URLopen/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://baseApi/open/;
|
|
proxy_buffering off;
|
|
proxy_redirect default;
|
|
proxy_connect_timeout 1800;
|
|
proxy_send_timeout 1800;
|
|
proxy_read_timeout 1800;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_types text/plain application/json application/javascript application/x-javascript text/css application/xml text/javascript;
|
|
gzip_proxied any;
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_buffers 16 8k;
|
|
gzip_http_version 1.0;
|
|
QL_ROOT_CONFIG
|
|
|
|
location QL_BASE_URL_LOCATION {
|
|
QL_ALIAS_CONFIG
|
|
index index.html index.htm;
|
|
try_files $uri QL_BASE_URLindex.html;
|
|
}
|
|
|
|
location ~ .*\.(html)$ {
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
}
|