gpt4 book ai didi

apache - keycloak apache 服务器配置出现 'Mixed Content' 问题

转载 作者:行者123 更新时间:2023-12-02 21:16:45 28 4
gpt4 key购买 nike

在我的 apache 服务器后面配置 keycloak 时遇到问题,

Mixed Content: The page at 'https://dev.mydomain.com/auth/admin/master/console/' was loaded over HTTPS, but requested an insecure script 'http://dev.mydomain.com/auth/resources/1.7.0.final/admin/keycloak/js/controllers/groups.js'. This request has been blocked; the content must be served over HTTPS.

我的apache配置是,

ServerName dev.mydomain.com 
ServerAdmin dev@mydomain.com



SSLEngine on
SSLCertificateFile /opt/mydomain/domains/dev.mydomain.com/apache/dev.mydomain.com.crt
SSLCertificateKeyFile /opt/mydomain/domains/dev.mydomain.com/apache/dev.mydomain.com.key
SSLCertificateChainFile /opt/mydomain/domains/dev.mydomain.com/apache/dev.mydomain.com.ca-bundle


DocumentRoot /opt/mydomain/domains/dev.mydomain.com/apache/htdocs

<Directory /opt/mydomain/domains/dev.mydomain.com/apache/htdocs>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>

ProxyRequests Off

ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

<Proxy https://dev.mydomain.com/* >
Order deny,allow
Deny from all
Allow from all
</Proxy>



ProxyPass /auth http://localhost:10082/auth nocanon
ProxyPassReverse /auth http://localhost:10082/auth

知道出了什么问题吗?

最佳答案

您还需要更新 Wildfly 配置,如 Enable SSL on a Reverse Proxy -> Configure WildFly 中所述。

如果您寻找 Wildfly CLI 配置,have a look here :

$ jboss-cli.sh -standalone --file=batch.cli

# batch.cli
embed-server --std-out=echo
batch
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=proxy-address-forwarding,value=true)
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=redirect-socket,value=proxy-https)
/socket-binding-group=standard-sockets/socket-binding=proxy-https:add(port=443)
run-batch
stop-embedded-server

关于apache - keycloak apache 服务器配置出现 'Mixed Content' 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35169503/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com