I am trying to run multiple WordPress websites, not all from the same domain, on my VPS. To be frank, while I know you can have multiple subdomains (of a single domain) running on apache2 (I've been doing it for the last couple of days :)), I'm not sure you can do both multiple domains and multiple subdomains.
Here's part of the /var/www/ directory structure I'm using:
/var/www/olbert.com/board/public_html/
/var/www/olbert.com/pursuit/public_html/
...
/var/www/jumpforjoysoftware.com/j4j/public_html
Olbert.com has 5 separate WordPress sites. JumpForJoySoftware as only one WordPress site, but I'm trying to set it up to support additional sites in the future.
Here are parts of the apache2 config files from /etc/apache2/sites-available. Please note I'm only showing you the "important" parts of the config files. There are additional files, one for each site, which define how to redirect from http to https.
First, board-le-ssl.conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName board.olbert.com
protocols h2 http/1.1
DocumentRoot /var/www/olbert.com/board/public_html
Next, pursuit-le-ssl.conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName pursuit.olbert.com
DocumentRoot /var/www/olbert.com/pursuit/public_html
Finally, j4j.conf (which I haven't set up for https access yet):
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName jumpforjoysoftware.com
ServerAlias www.jumpforjoysoftware.com
DocumentRoot /var/www/jumpforjoysoftware.com/j4j/public_html
What's weird about the configuration's impact is this. I can surf to any of the subdomains on olbert.com (i.e., board.olbert.com, pursuit.olbert.com). The sites display correctly (after redirecting me to https://).
But when I try to surf to http://www.jumpforjoysoftware.com I end up at https://286chestnut.olbert.com. Which is bizarre.
I've ensured I've restarted the apache2 service before running tests (and no fatal errors are reported). I've also tried using a website that traces redirects, and it doesn't show any. I'm just being served the wrong pages.
Any advice or suggestions would be appreciated.