spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.53k stars 3.33k forks source link

How to Set Different HTTPS Certificates for Different Domain Names #893

Closed tutuerhao closed 5 years ago

tutuerhao commented 5 years ago

How to Set Different HTTPS Certificates for Different Domain Names?

ryanjbaxter commented 5 years ago

Please provide more information about what you are trying to do.

tutuerhao commented 5 years ago

server { server_name admin.xxxxx.com.cn; listen 443; ssl on; ssl_certificate ./pem/admin.xxxxx.com.cn/full_chain.pem; ssl_certificate_key ./pem/admin.xxxxx.com.cn/private.key; client_max_body_size 50M;

    location / {
        proxy_pass  http://aaa/;
    }
}
server {
    server_name  www.xxxxx.com.cn;
    listen       443;
    ssl on;
    ssl_certificate ./pem/full_chain.pem;
    ssl_certificate_key ./pem/private.key;
    client_max_body_size 50M;

    location / {
        proxy_pass  http://bbb/;
    }
}

as above, This is my nginx config file,If I have multiple subdomains, How to configure multiple certificates in the Springcloud Gateway

spencergibb commented 5 years ago

That is all done via spring boot. I'll have to find the regenerated reference later

tutuerhao commented 5 years ago

That is all done via spring boot. I'll have to find the regenerated reference later

Sorry, I didn't find a similar configuration in springboot,Can you give me a link about it?

ryanjbaxter commented 5 years ago

Here are the spring boot docs https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#howto-configure-ssl

jyialive commented 4 years ago

Here are the spring boot docs https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#howto-configure-ssl

Sorry, You understand wrong, the issue is "Set Different HTTPS Certificates"