WordPress + WordPress Network on Single Server conflict

I have two installs of wordpress on a single Amazon EC2 server. One of them is just a regular wordpress install, the other being a wordpress network install, with WP Domain Mapping installed.

So let’s say I have four domain names: site.example.com, multisite.example.com, multisite1.com and multisite2.com

Read More

All of the domain names are pointing to the same IP address. Multisite1.com and multisite2.com are domain mapped to blogs under the multisite.example.com wordpress network

On my server httpd.conf is setup as follows:

<VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /persistent/html/site1
        ServerName site.example.com
        ErrorLog logs/site_error_log
        CustomLog logs/site_access_log combined
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /persistent/html/multisite
        ServerName multisite.example.com
        ErrorLog logs/multisite_error_log
        CustomLog logs/multisite_access_log combined
</VirtualHost>

Right now, all of the domains seem to go to the right place – until I start getting to the wp-admin panel.

site.example.com/wp-admin and multisite.example.com/wp-admin appear to work fine.

multisite1.com/wp-admin and multisite2.com/wp-admin both seem to redirect to site.example.com/wp-admin instead of multisite.example.com/wp-admin.

I can’t figure out why. I have tried putting all of the domain names in the virtual host as ServerAlias but it doesn’t seem to have helped. I’ve also put in a wildcard ServerAlias under multisite.example.com as well, but no luck.

Any ideas? It is a bizarre install I know, but for the time being for other reasons, I have to get it to work this way. I will eventually separate the two.

Related posts

Leave a Reply

1 comment

  1. Create a new sites-available entry for each of your sub-domain or virtual host for each sub-domain pointing to the same web root and reload the apache. After that all will work fine.
    For e.g.

    <VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /persistent/html/multisite
        ServerName multisite1.com
        ErrorLog logs/multisite_error_log
        CustomLog logs/multisite_access_log combined
    </VirtualHost>
    <VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /persistent/html/multisite
        ServerName multisite2.com
        ErrorLog logs/multisite_error_log
        CustomLog logs/multisite_access_log combined
    </VirtualHost>