Update reverse proxy. Add hosts config

This commit is contained in:
York Zhao 2024-07-23 21:46:06 +08:00 committed by GitHub
parent f09c149b7f
commit 1561f679ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -509,6 +509,15 @@ END
</user-mapping>
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
guacd-hostname: localhost
guacd-hostname: 127.0.0.1
guacd-port: 4822
auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider
basic-user-mapping: /etc/guacamole/user-mapping.xml
@ -559,6 +568,15 @@ END
</user-mapping>
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