From 1561f679eaafe3326abcb7cf72ee155bc493630e Mon Sep 17 00:00:00 2001 From: York Zhao Date: Tue, 23 Jul 2024 21:46:06 +0800 Subject: [PATCH] Update reverse proxy. Add hosts config --- OneClickDesktop_zh-CN.sh | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/OneClickDesktop_zh-CN.sh b/OneClickDesktop_zh-CN.sh index f311900..4ea46f5 100644 --- a/OneClickDesktop_zh-CN.sh +++ b/OneClickDesktop_zh-CN.sh @@ -509,6 +509,15 @@ END END fi + cat > /etc/hosts << END +127.0.0.1 localhost + +# The following lines are desirable for IPv6 capable hosts + +# ::1 localhost ip6-localhost ip6-loopback +#ff02::1 ip6-allnodes +#ff02::2 ip6-allrouters +END systemctl restart tomcat9 guacd say @B"Guacamole配置成功!" green echo @@ -519,7 +528,7 @@ function configure_guacamole_centos echo mkdir /etc/guacamole/ cat > /etc/guacamole/guacamole.properties < END fi + cat > /etc/hosts << END +127.0.0.1 localhost + +# The following lines are desirable for IPv6 capable hosts + +# ::1 localhost ip6-localhost ip6-loopback +#ff02::1 ip6-allnodes +#ff02::2 ip6-allrouters +END systemctl restart tomcat9 guacd say @B"Guacamole配置成功!" green echo @@ -832,8 +850,8 @@ function install_reverse_proxy email $le_email } $guacamole_hostname { - reverse_proxy localhost:8080/guacamole - + reverse_proxy http://localhost:8080 + rewrite / /guacamole } END systemctl start caddy @@ -855,8 +873,8 @@ END auto_https off } $guacamole_hostname { - reverse_proxy localhost:8080/guacamole - + reverse_proxy http://localhost:8080 + rewrite / /guacamole } END say @B"Let's Encrypt证书未安装,如果您之后需要安装Let's Encrypt证书,请手动更改Caddyfile,位于/etc/caddy/Caddyfile" yellow