How To Add SSL On Subdomain

Okay so my domain is https://www.oldskoolgaming.in/

Using Ubuntu 14.04
Life is easy on ubuntu yay !!

So, Umm, everything’s fine for www.oldskoolgaming.in & oldskoolgaming.in, now I want to add shop.oldskoolgaming.in and bans.oldskoolgaming.in too…!

I’ll be hosting the shop files in /var/www/shop.oldskoolgaming.in and bans files in /var/www/bans.oldskoolgaming.in…

Now, This is my current oldskoolgaming.in.conf contents…

< VirtualHost *:80 >
ServerAdmin support@oldskoolgaming.in
ServerName oldskoolgaming.in
ServerAlias www.oldskoolgaming.in
DocumentRoot /var/www/oldskoolgaming.in/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log comb[ined
< /VirtualHost >

Here’s the shop.oldskoolgaming.in.conf contents…

< VirtualHost *:80 >
ServerAdmin support@oldskoolgaming.in
ServerName shop.oldskoolgaming.in
DocumentRoot /var/www/shop.oldskoolgaming.in/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log comb[ined
< /VirtualHost >

And Vice Versa for bans.oldskoolgaming.in.conf…

I’ve SSL up and running for www and non www version of oldskoolgaming.in
Now, How to add ssl support for these two ??!

Should I just run ‘./certbot-auto’ and that’s it ? Or should I have to do anything else…
Just Don’t want to mess my stuff., that’s why !

Thanks !!

Just run certbot again with --apache --expand and -d flags for your existing and new names. That should replace your existing cert with one for all 4 names and configure the other 2 vHosts.

So this will be the command right ?

./certbot-auto --apache --expand

Anything else ?!

You’re missing the -d flags

./certbot-auto --apache --expand -d oldskoolgaming.in -d www.oldskoolgaming.in -d shop.oldskoolgaming.in -d bans.oldskoolgaming.in

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.