Multiple domains same IP different multisite directory installs

Hi There,

I have a number of domain names with A records that all point to the same IP address. I have a LAMP stack running on the machine at that IP with a series of apache2 virtual hosts that direct http requests to the appropriate root directories. I have a subdirectory installation of a multisite network in one of my virtual hosts. Is it possible for me to configure this so that different domains point to different sub directory sites in my network. Eg:

domain1.com.au --> multisite.net/site1
domain2.com.au --> multisite.net/site2
..etc

I have tried Multi-Domains and Domain Mapping plugins but neither of these seemed to do the trick.

Any advice really appreciated,
Mark

  • Adam Czajczyk

    Hello Mark,

    I hope you're well today and thank you for your question!

    It is entirely possible to "map" different domains to different sub-directories (a.k.a sub-sites) of your Multisite Network. Our Domain Mapping plugin should let you do this easily but the "trick" here is a proper setup of your Apache2 Virtual Hosts for those domain that you'd like to map to Multisite.

    a series of apache2 virtual hosts that direct http requests to the appropriate root directories

    The "root" directory for the domain that you wish to assign to the sub-site of your MultiSite Network must be the same as the "root" directory for your MultiSite Network. An example:

    - your main MultiSite's site is at "mynetwork.com"
    - the "root" folder for it is "/html/mynetwork"
    - the sub-site you wish to give it its own domain is "mynetwork.com/subsite"
    - the domain "to be mapped" is "newdomain.com"

    The mapping would be then "newdomain.com -> mynetwork.com/subsite"

    To make this work the "root" folder for "newdomain.com" must be the same as root folder for "mynetwork.com", therefore it would be "/html/mynetwork".

    With this setup and A records pointing to proper (the same) IP, this should work "out of the box".

    I hope that helps!

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.