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.

Re: ssl certs on wordpress multisites

Posted: Tue Apr 14, 2020 5:23 pm
by Bubblecatcher
this is no longer working for me, i am now getting a ssl cert security warning when loading wpms mapped domains?


Any ideas

Re: ssl certs on wordpress multisites

Posted: Mon May 04, 2020 4:27 pm
by Bubblecatcher
Updated

Getting SSL working on word press multisites (WPMU) with domain mapping.

Took me a while to work this out on, but thought i would post it here to help others out.

Setup wordpress multisite and domain mapping using latest wordpress guides no domain mapping plugins.

Code: Select all

Recap.
Multisite installed - yes
In main dashboard go to sites, add sites with default settings - yes
Ensure wordpress is set to use https - yes
Wordpress multisite works best on dedicated IP so ensure your parent WPMU site is on one.

Previously i had created the child WPMU site as a normal domain on shared IP and changed the dns record for web to point at parent WPMU site dedicated IP.

After much hassle I read that creating an alias in main WPMU site in vestacp would work for ssl on all WPMU child domains.

If you already have created the child domain as normal domain you will need to delete it, make sure you backup any data you need such as mail.

I

Code: Select all

n CP edit your WPMU parent site edit

Web>Domain>Edit Web Domain

in the alias section put

childdomain1.com
childdomain2.com
childdomain2.com

(note have not yet tried creating the www aliases for parent and child domains)

Now enable ssl
Enable SSL for this domain
Use Lets Encrypt to obtain SSL certificate
Enable automatic HTTP-to-HTTPS redirection
Enable HTTP Strict Transport Security (HSTS)

SAVE
This may take a while.

If you get any error try creating the aliases first, then enable SSL

Code: Select all

Back to wordpress main dashboard > sites

Select child site
Info Tab
Site Address (URL) - https://childdomain1.com

Settings Tab
Siteurl - https://childdomain1.com
Home - https://childdomain1.com

save.
Check main WPMU site and view certificate details, you should see the aliases for mapped sites there.

Note the only issue i have setting up WPMU with domain mapping and not using domain mapping plugin (deceased) is not being logged into all child sites as superadmin.

hope this helps

Re: ssl certs on wordpress multisites

Posted: Sun May 24, 2020 6:02 pm
by natbot400
Bubblecatcher wrote:
Mon May 04, 2020 4:27 pm
Updated

Getting SSL working on word press multisites (WPMU) with domain mapping.

Took me a while to work this out on, but thought i would post it here to help others out.

Setup wordpress multisite and domain mapping using latest wordpress guides no domain mapping plugins.

Code: Select all

Recap.
Multisite installed - yes
In main dashboard go to sites, add sites with default settings - yes
Ensure wordpress is set to use https - yes
Wordpress multisite works best on dedicated IP so ensure your parent WPMU site is on one.

Previously i had created the child WPMU site as a normal domain on shared IP and changed the dns record for web to point at parent WPMU site dedicated IP.

After much hassle I read that creating an alias in main WPMU site in vestacp would work for ssl on all WPMU child domains.

If you already have created the child domain as normal domain you will need to delete it, make sure you backup any data you need such as mail.

I

Code: Select all

n CP edit your WPMU parent site edit

Web>Domain>Edit Web Domain

in the alias section put

childdomain1.com
childdomain2.com
childdomain2.com

(note have not yet tried creating the www aliases for parent and child domains)

Now enable ssl
Enable SSL for this domain
Use Lets Encrypt to obtain SSL certificate
Enable automatic HTTP-to-HTTPS redirection
Enable HTTP Strict Transport Security (HSTS)

SAVE
This may take a while.

If you get any error try creating the aliases first, then enable SSL

Code: Select all

Back to wordpress main dashboard > sites

Select child site
Info Tab
Site Address (URL) - https://childdomain1.com

Settings Tab
Siteurl - https://childdomain1.com
Home - https://childdomain1.com

save.
Check main WPMU site and view certificate details, you should see the aliases for mapped sites there.1
auto clicker
Note the only issue i have setting up WPMU with domain mapping and not using domain mapping plugin (deceased) is not being logged into all child sites as superadmin.

hope this helps
This work for me i am also facing this same issue on ssl btw thanks for help

Re: ssl certs on wordpress multisites

Posted: Tue May 26, 2020 12:00 pm
by Bubblecatcher
I got the log into admin on separate sites working, make sure in site settings in both 'Info & Settings' tab you have:

https://mappeddomain.com

In browser clear all site data / cookies you should now be able to log into main site admin and mappeddomain admins.

Note i have main site admin user account added to all mapped sites.