修复baseUrl

This commit is contained in:
whyour
2022-09-02 10:54:44 +08:00
parent b9253c8191
commit 1fe91508f6
4 changed files with 10 additions and 8 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ echo -e "======================1. 检测配置文件========================\n"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
cp -fv $nginx_conf /etc/nginx/nginx.conf
envsubst '${qlBaseUrl}' < $nginx_app_conf > /etc/nginx/conf.d/front.conf
cp -fv $nginx_app_conf /etc/nginx/conf.d/front.conf
sed -i "s,QL_BASE_URL,${qlBaseUrl},g" /etc/nginx/conf.d/front.conf
pm2 l &>/dev/null
echo
+5 -5
View File
@@ -16,14 +16,14 @@ server {
root /ql/static/dist;
ssl_session_timeout 5m;
location ${ql_base_url}api/public {
location QL_BASE_URL/api/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;
proxy_pass http://publicApi/api/public/;
}
location ${ql_base_url}api {
location QL_BASE_URL/api {
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;
@@ -33,7 +33,7 @@ server {
proxy_set_header Connection $connection_upgrade;
}
location ${ql_base_url}open {
location QL_BASE_URL/open {
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;
@@ -49,9 +49,9 @@ server {
gzip_buffers 16 8k;
gzip_http_version 1.0;
location ${ql_base_url} {
location QL_BASE_URL/ {
index index.html index.htm;
try_files $uri $uri/ ${ql_base_url}index.html;
try_files $uri $uri/ QL_BASE_URL/index.html;
}
location ~ .*\.(html)$ {