Page 1 of 1

ssl certs on wordpress multisites

Posted: Tue Nov 13, 2018 2:40 pm
by Bubblecatcher
Hi, i have a wordpress multisite using subdomains for mapped domains. I have a ssl cert working fine on main WPMS domain (own IP), mapped domains work fine except for ssl cert, they load the main WPMS domain cert, which of course produces error regarding who cert belongs to.

Any ideas on getting the mapped domains to use their own ssl certs?

I have found guides for cpanel and cloudflare which seem straight forward, but nothing for vestacp!

thanks

Re: ssl certs on wordpress multisites

Posted: Sun Feb 10, 2019 11:28 am
by Bubblecatcher
Hi, going to drag this one up again as i still have not been able to this working?


If i setup ssl on a domain before i mapped it to WP multisite it works fine, but soon as i mapped it i get ssl safety warning in browser which tell me the mapped domain is use the WP multisite primary domains ssl cert?

The mapped domain is setup correctly in WP, I have tried editing the mapped domains conf files

Code: Select all

mappeddomain.photography.apache2.conf      mappeddomain.photography.nginx.conf        
mappeddomain.photography.apache2.ssl.conf  mappeddomain.photography.nginx.ssl.conf
to add

Code: Select all

apache
ServerAlias www.mappeddomain.photography *.mappeddomain.photography


nginx
server_name *.mappeddomain.photography www.mappeddomain.photography;
any ideas?

Re: ssl certs on wordpress multisites

Posted: Sun Feb 10, 2019 12:46 pm
by Bubblecatcher
Hi, me again.

So i had a thought, my primary WP multisite it has its own dedicated IP, but mapped domains reside on the servers shared IP until they are mapped, then the mapped dns is edited to point to IP of primary WP multisite:

Code: Select all

* A record > primary WP multisite IP
	
@ A record > primary WP multisite IP
So my thought is, do i have to change the primary WP multisite IP from dedicated to shared for ssl to work for mapped domains?

thanks

Re: ssl certs on wordpress multisites

Posted: Tue May 14, 2019 5:07 am
by mlaungani
Hi @Bubblecatcher,

We seem to be having a similar issue while setting up Wordpress multisite, and the SSL for it. So, just wanted to check with you if you were able to resolve this or not?

If yes, would it be too much to ask for some help about it?

TIA
Manish

Re: ssl certs on wordpress multisites

Posted: Tue May 14, 2019 10:17 am
by Bubblecatcher
Hi, ok I think I have finally succeeded.


I tried many methods, editing conf files to redirect ssl etc all to know avail.

Then I read that creating an alias in main WPMU site in vestacp would work, to do this you need to delete the domain from vestcp if you have already created it.

ref domain =

Code: Select all

wpmudomain.com
mappeddomain1.com
Setup wpmu for mapping, wpmudomain.com has own IP.

Put this IP in

Code: Select all

wp-admin/network/settings.php?page=domainmapping_options
Ensure wordpress is set to use https

In vestacp edited domain wpmudomain.com

in the alias section put

Code: Select all

www.wpmudomain.com
mappeddomain1.wpmudomain.com
Now enable ssl > Lets Encrypt Support

save.

Note, i had problems if added mappeddomain.com to alias when first created ssl cert, i got nginx did not restart error and no cert created.

Once cert is created add mappeddomain.com to domain alias,

Code: Select all

www.wpmudomain.com
mappeddomain1.wpmudomain.com
mappeddomain1.com
save.

This has worked for one domain:
https://beautifulfamily.photography/

But when i setup a second domain it is not?
https://yourfamilystory.photography/

It could be I need to wait as had to delete second domain to be able to add it as an alias.

All setting look the same and both domains are coming up in alias list.

Note, if you want email for mapped domains I believe you will need to create an email domain for them in vestacp.


Note
Checking the ssl cert details on working mapped domain it shows the ss cert as belonging to:

Code: Select all

wpmudomain.com
It also shows

Code: Select all

DNS NAME wpmudomain.com
DNS NAME mappeddomain1.wpmudomain.com
DNS NAME mappeddomain1.com
It is not yet showing DNS NAME for mappeddomain2 ?

Not sure if Lets Encrypt will update this via cron sometime?


Ideally I would prefer to have own cert for each mapped domain, but this is a start.

Re: ssl certs on wordpress multisites

Posted: Wed May 15, 2019 3:18 pm
by dannyrichardson
This worked for me. Thank you very much for the tips.