Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ed821e

Browse files
committed
fix: update nginx settings
1 parent511ab25 commit9ed821e

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

‎deploy/docker/default.env‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ LOWCODER_MONGODB_EXPOSED="false"
4040
#
4141
# URL of the public User Interface
4242
LOWCODER_PUBLIC_URL="http://localhost:3000/"
43-
LOWCODER_BASE_PATH=""
43+
44+
# Basepath on which to run lowcoder
45+
#
46+
# ! Make sure to start it with '/' !
47+
#
48+
LOWCODER_BASE_PATH="/"
4449

4550
# ID of user running services. It will own all created logs and data.
4651
LOWCODER_PUID="1000"

‎deploy/docker/frontend/01-update-nginx-conf.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ else
1818
ln -s /etc/nginx/nginx-http.conf /etc/nginx/nginx.conf
1919
fi;
2020

21+
LOWCODER_BASE_PATH_ROOT="${LOWCODER_BASE_PATH%/}"
22+
if [-z"${LOWCODER_BASE_PATH_ROOT}" ];then
23+
LOWCODER_BASE_PATH_ROOT="/"
24+
fi;
25+
2126
sed -i"s@__LOWCODER_MAX_REQUEST_SIZE__@${LOWCODER_MAX_REQUEST_SIZE:=20m}@" /etc/nginx/nginx.conf
2227
sed -i"s@__LOWCODER_MAX_QUERY_TIMEOUT__@${LOWCODER_MAX_QUERY_TIMEOUT:=120}@" /etc/nginx/server.conf
2328
sed -i"s@__LOWCODER_API_SERVICE_URL__@${LOWCODER_API_SERVICE_URL:=http://localhost:8080}@" /etc/nginx/server.conf
2429
sed -i"s@__LOWCODER_NODE_SERVICE_URL__@${LOWCODER_NODE_SERVICE_URL:=http://localhost:6060}@" /etc/nginx/server.conf
30+
sed -i"s@__LOWCODER_BASE_PATH_ROOT__@${LOWCODER_BASE_PATH_ROOT}@" /etc/nginx/server.conf
2531
sed -i"s@__LOWCODER_BASE_PATH__@${LOWCODER_BASE_PATH}@" /etc/nginx/server.conf
2632

2733
echo"nginx config updated with:"

‎deploy/docker/frontend/server.conf‎

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,58 @@
1+
error_log /dev/stdout debug;
2+
13
root /lowcoder/client;
24

35
proxy_connect_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
46
proxy_send_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
57
proxy_read_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;
68

7-
location __LOWCODER_BASE_PATH__/ {
9+
sub_filter "/__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
10+
sub_filter_once off;
11+
sub_filter_types *;
12+
13+
location __LOWCODER_BASE_PATH_ROOT__ {
14+
15+
rewrite ^__LOWCODER_BASE_PATH_ROOT__/?(.*)$ /$1 break;
16+
817
try_files $uri /index.html;
918

1019
if ($request_filename ~* .*.(html|htm)$) {
1120
add_header Cache-Control no-cache;
1221
}
1322

14-
sub_filter "__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
15-
sub_filter_once off;
16-
sub_filter_types *;
1723
}
1824

1925
location __LOWCODER_BASE_PATH__/sdk {
2026
try_files $uri =404;
2127

2228
alias /lowcoder/client-sdk;
2329
expires 1M;
24-
25-
sub_filter "__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
26-
sub_filter_once off;
27-
sub_filter_types *;
2830
}
2931

3032
location __LOWCODER_BASE_PATH__/comps {
3133
try_files $uri =404;
3234

3335
alias /lowcoder/client-comps;
3436
expires 1M;
35-
sub_filter "__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
36-
sub_filter_once off;
37-
sub_filter_types *;
3837
}
3938

4039
location __LOWCODER_BASE_PATH__/embed {
4140
try_files $uri =404;
4241

4342
alias /lowcoder/client-embed;
4443
expires 1M;
45-
sub_filter "__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
46-
sub_filter_once off;
47-
sub_filter_types *;
4844
}
4945

5046
location __LOWCODER_BASE_PATH__/assets {
5147
try_files $uri =404;
5248

5349
alias /lowcoder/assets;
5450
expires 1M;
55-
sub_filter "__LOWCODER_BASEPATH_PLACEHOLDER__" "__LOWCODER_BASE_PATH__";
56-
sub_filter_once off;
57-
sub_filter_types *;
5851
}
5952

6053
location __LOWCODER_BASE_PATH__/api {
54+
rewrite ^__LOWCODER_BASE_PATH__/?(.*)$ /$1 break;
55+
6156
proxy_set_header X-Forwarded-Proto $scheme;
6257
proxy_set_header X-Forwarded-Host $host;
6358
proxy_set_header X-Forwarded-For $remote_addr;
@@ -66,6 +61,8 @@
6661
}
6762

6863
location __LOWCODER_BASE_PATH__/node-service/plugin-icons {
64+
rewrite ^__LOWCODER_BASE_PATH__/?(.*)$ /$1 break;
65+
6966
proxy_set_header X-Forwarded-Proto $scheme;
7067
proxy_set_header X-Forwarded-Host $host;
7168
proxy_set_header X-Forwarded-For $remote_addr;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp