mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复baseUrl
This commit is contained in:
parent
b9253c8191
commit
1fe91508f6
|
@ -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
|
||||
|
||||
|
|
|
@ -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)$ {
|
||||
|
|
|
@ -30,7 +30,8 @@ copy_dep() {
|
|||
|
||||
echo -e "---> 2. 复制nginx配置文件\n"
|
||||
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
|
||||
echo -e "---> 配置文件复制完成\n"
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ import_config() {
|
|||
[[ -f $file_config_user ]] && . $file_config_user
|
||||
[[ -f $file_env ]] && . $file_env
|
||||
|
||||
ql_base_url=${QlBaseUrl:-"/"}
|
||||
ql_base_url=${QlBaseUrl:-""}
|
||||
command_timeout_time=${CommandTimeoutTime:-"1h"}
|
||||
proxy_url=${ProxyUrl:-""}
|
||||
file_extensions=${RepoFileExtensions:-"js py"}
|
||||
|
|
Loading…
Reference in New Issue
Block a user