I followed this tutorial. How To Install WordPress with LEMP on Ubuntu 16.04(https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04) - I also followed Prerequisites.
Wordpress site works well with letsencrypt.
But I want to add wordpress multisite with sub domain&domain mapping. exsisted wordpress example.com wordpress multisite sub-domain test.example.com domain mapping second.com
I tried How To Set Up WordPress Multisite with Nginx on Ubuntu 14.04 (https://www.digitalocean.com/community/tutorials/how-to-set-up-wordpress-multisite-with-nginx-on-ubuntu-14-04).
But I can’t access neither sub-domain nor domain-mapped domain. I can’t access test.example.com / and second.com redirected to example.com.
How can I set up Wordpress Multisite with exsisted wordpress site.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
I just solved with this.
If you use sub-domain mapping and want SSL for each mapped installation, you’d need to purchase a WildCard SSL Certificate for your main domain and install it. LetsEncrypt won’t work for WildCards.
Passing multiple domains to the LetsEncrypt script in this case, would not be the best option as this is something you’re going to have to do over and over again for each and every sub-domain you add as a site. That means if you add two sub-domains today, you have to run it. If you add two more tomorrow, same scenario.
You’ll need to setup a WildCard DNS
Aentry for sub-domains to map to your primary domain. If you look at the guide, you’ll see this:
This tells NGINX to map all sub-domains to your main domain unless they actually resolve to another server block. This doesn’t, however, account for DNS.
You’ll need to add an
Aentry to your DNS zone file for the WildCard (i.e.
*). That’d look like this:
DROPLET_IPis your Droplets IPv4 IP. With those two things taken care of, you should be able to use anything.examplewp.com and it resolve to the main domain. If it happens to be mapped using WPMU, then WPMU should take over and map the correct WordPress site.
One other thing to note is that LetsEncrypt doesn’t support WildCard domains, so you can’t pass:
You have to pass resolvable domains and sub-domains, i.e.
This may be an issue since you’re wanting to use sub-domain mapping as the only way (right now) to get a WildCard SSL Certificate is to buy one. So without a WildCard SSL Certificate, each site would be HTTP only (not HTTPS/SSL/HTTP2).