小编Atu*_*air的帖子

使用 nginx 的 Keycloak 重定向 url 将转到 http 而不是 https

Keycloak 正在使用带有 nginx 配置的反向代理,以便在 ssl(https) 中可用。现在我已经在 ubuntu 中部署了 .net 核心应用程序。此应用程序位于 http 中,并使用 keycloak 作为 openid 连接进行身份验证。

但是,当应用程序使用 nginx 托管在 https 中时,keycloak 会显示无效的重定向 url 而不是登录页面。Keycloak 登录 url 页面包含带有 http 而不是 https 的 redirect_uri 参数。请帮助解决在反向代理的 nginx 配置文件中完成的配置

server {

 listen 443  ssl;

 server_name  abc.ctech.com;

 ssl_certificate /etc/nginx/external/wildcard_ctech_com.pem;

 ssl_certificate_key /etc/nginx/external/private.rsa;


location / {


   proxy_http_version 1.1;

   proxy_set_header Host abc.ctech.com; 

  proxy_set_header X-Real-IP $remote_addr;

   proxy_set_header X-Forwarded-Proto https;

   proxy_set_header X-Forwarded-Port 443;

   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  

proxy_pass http://172.30.5.28:8001; 


  }

}

#Keycloak Service
server {

  listen 443  ssl;

  server_name  keycloak.ctech.com; 

 ssl_certificate …
Run Code Online (Sandbox Code Playgroud)

jboss nginx

8
推荐指数
2
解决办法
7209
查看次数

标签 统计

jboss ×1

nginx ×1