Multisite WordPress on subdomains within Virtualmin
Published on .
I needed a multisite WordPress instance with custom domains within my Virtualmin instance. I had an easy time setting up multisite WordPress in subdomain mode, but a terrible time with adding sites.
In other words, I want to run multisite WordPress at foo.example.com and have sub-sites such as blah.foo.example.com (and later example.org!)
I have since determined that my first source of trouble was not starting with a wildcard certificate, so do that first.
Once that’s in place, you create virtual servers (e.g. blah.foo.example.com) as aliases of foo.example.com without an apache site.
If you have any trouble, the 2 key bits are that there’s a ServerAlias directive in the virtualhost config and an A record in the DNS zone.