Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/jumpserver/docker-web into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jun 25, 2024
2 parents f937475 + 7783ce3 commit e112aed
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
11 changes: 11 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ server {
return 200 "User-agent: *\nDisallow: /\n";
}

location /web/health/ {
access_log off;
add_header Content-Type 'application/json';
return 200 '{"status": "ok"}';
}

location /player/ {
try_files $uri / /index.html;
alias /opt/player/;
}

location /ui/ {
try_files $uri / /index.html;
alias /opt/lina/;
Expand Down
36 changes: 18 additions & 18 deletions http_server.conf
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
server {
listen 80;
# listen [::]:80;
# server_name demo.jumpserver.org; # 取消注释并自行修改成你自己的域名
listen 80;
# listen [::]:80;
# server_name demo.jumpserver.org; # 取消注释并自行修改成你自己的域名

client_max_body_size 5000m;
client_max_body_size 5000m;

location / {
proxy_pass http://localhost:51980;
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_ignore_client_abort on;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 6000;
location / {
proxy_pass http://localhost:51980;
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_ignore_client_abort on;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 6000;
}
}
6 changes: 3 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function config_nginx() {
fi

if [ "${USE_IPV6}" == "1" ]; then
sed -i "s@# listen [::]:80;@listen [::]:80;@g" "${config_file}"
sed -i "s@# listen \[::\]:80;@listen \[::\]:80;@g" "${config_file}"
if [ -f "/etc/nginx/conf.d/default.conf" ]; then
sed -i "s@# listen [::]:51980;@listen [::]:51980;@g" /etc/nginx/conf.d/default.conf
sed -i "s@# listen \[::\]:51980;@listen \[::\]:51980;@g" /etc/nginx/conf.d/default.conf
fi
fi

Expand Down Expand Up @@ -88,7 +88,7 @@ function config_https() {
sed -i "s@server web:.*;@server localhost:51980;@g" "${config_file}"

if [ "${USE_IPV6}" == "1" ]; then
sed -i "s@listen 443@listen [::]:443@g" "${config_file}"
sed -i "s@# listen \[::\]:443@listen \[::\]:443@g" "${config_file}"
fi

if [ "${HTTPS_PORT}" != "443" ]; then
Expand Down

0 comments on commit e112aed

Please sign in to comment.