Welcome! Log In Create A New Profile

Advanced

Question on having multiple SSL cert for multiple domains

Posted by Hamidul Islam 
Hamidul Islam
Question on having multiple SSL cert for multiple domains
July 04, 2018 04:10PM
Hi NGINX Support

It will be very helpful to advise how can we add 2 different SSL for 2 URLs
at the nginx configuration.

At present we have 2 configuration files for managing the URLs

At one of the configuration (Config file 01) file we have one site with SSL
cert.

And at another configuration file(Config file 02) we have many domains with
no cert.

What we want is to have a SSL cert to one of the domain at the 2nd
configuration file that has many domains.

*At Config File 01 the configuration example is as below with the SSL cert:*

# SSL cert is declared globally as below:

ssl_certificate /etc/nginx/sslSHA2_2015/server.bundle.crt;
ssl_certificate_key /etc/nginx/sslSHA2_2015/server.key;

server {
listen 443 ssl;
server_name site1.com:443;
.........}

*At Config File 02 the configuration example is as below that does not has
any SSL cert:*

server {
listen 80;
server_name www.site2.ca site2.ca;
client_max_body_size 50M;
proxy_read_timeout 180s;

.......}

server {
listen 80;
server_name www.site3.ca site3.ca;
client_max_body_size 50M;
proxy_read_timeout 180s;

.......}


Can you advise how can we add a SSL cert for one domain (example for
site2.ca) in the config02 file and what changes we need to do in the config
01 file?

Thanks
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Danny Horne via nginx
Re: Question on having multiple SSL cert for multiple domains
July 04, 2018 05:10PM
On 04/07/18 15:08, Hamidul Islam wrote:
> Hi NGINX Support
>
> It will be very helpful to advise how can we add 2 different SSL for 2
> URLs at the nginx configuration.
>
> Can you advise how can we add a SSL cert for one domain (example
> for site2.ca http://site2.ca/) in the config02 file and what changes
> we need to do in the config 01 file?
>
> Thanks
>
>
Easiest way (in my opinion) would be to place the ssl configurations
with the appropriate server block
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On 04.07.2018 17:03, Danny Horne via nginx wrote:

> Easiest way (in my opinion) would be to place the ssl configurations
> with the appropriate server block

Agreed. The SSL configuration parameters can either be added directly or via
'include' statements. Personally, I prefer using generator scripts which produce
nginx config files over include statements because it makes the resulting files
easier to read.

-Ralph
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login