Nginx位于Key斗篷和本地微服务前面

Nginx位于Key斗篷和本地微服务前面,nginx,keycloak,netflix-zuul,nginx-reverse-proxy,Nginx,Keycloak,Netflix Zuul,Nginx Reverse Proxy,我正在尝试设置nginx+keybeave来保护我的spring-boot微服务 我希望配置以下结构 internet ---https---> nginx --http--> keycloak and other protected microservices keycloak <----http----> zuul and other microservices KeyClope实例为https打开8443,为ht

我正在尝试设置nginx+keybeave来保护我的spring-boot微服务

我希望配置以下结构

   internet ---https---> nginx --http--> keycloak and other protected microservices

                   keycloak <----http----> zuul and other microservices   
KeyClope实例为https打开8443,为http打开8080

SpringCloudZuul配置如下

server:
  port: "15700"

keycloak:
   auth-server-url: "https://my.external.ip:8443/auth"
   realm: "LedgerRunCTP"
   public-client: true
   resource: gateway-service
   security-constraints[0]:
     authRoles[0]: "user"
     securityCollections[0]:
       name: "internal services"
       patterns[0]: "/swagger-ui.html"
  • 我必须将“身份验证服务器url”配置为https,因为客户端需要首先使用KeyClope登录,而非本地连接需要https。有没有一种方法可以直接将http用于密钥斗篷
  • 使用上述配置,一旦Key斗篷对用户进行身份验证,就会出现以下错误:

    普通HTTP请求已发送到HTTPS端口

  • 设置它的正确配置是什么

  • 仅https到nginx
  • nginx背后的所有http
  • server:
      port: "15700"
    
    keycloak:
       auth-server-url: "https://my.external.ip:8443/auth"
       realm: "LedgerRunCTP"
       public-client: true
       resource: gateway-service
       security-constraints[0]:
         authRoles[0]: "user"
         securityCollections[0]:
           name: "internal services"
           patterns[0]: "/swagger-ui.html"