支持非根目录部署

This commit is contained in:
whyour
2023-05-19 01:10:33 +08:00
parent 1377fe31aa
commit 490bdc15f6
13 changed files with 88 additions and 55 deletions
+6 -6
View File
@@ -14,10 +14,9 @@ map $http_upgrade $connection_upgrade {
server {
listen 5700;
IPV6_CONFIG
root /ql/static/dist;
ssl_session_timeout 5m;
location QL_BASE_URL/api/public/ {
location QL_BASE_URLapi/public/ {
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;
@@ -25,7 +24,7 @@ server {
proxy_buffering off;
}
location QL_BASE_URL/api/ {
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;
@@ -36,7 +35,7 @@ server {
proxy_set_header Connection $connection_upgrade;
}
location QL_BASE_URL/open/ {
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;
@@ -53,9 +52,10 @@ server {
gzip_buffers 16 8k;
gzip_http_version 1.0;
location QL_BASE_URL/ {
location QL_BASE_URL_LOCATION {
QL_ROOT_OR_ALIAS /ql/static/dist;
index index.html index.htm;
try_files $uri $uri/ QL_BASE_URL/index.html;
try_files $uri QL_BASE_URLindex.html;
}
location ~ .*\.(html)$ {