• I am trying to understand how two separate domains can me mapped to a multisite network.
    I see this – https://codex.www.ads-software.com/WordPress_Multisite_Domain_Mapping

    rootsite.com
    childsite1.com
    childsite2.com etc

    So I point my domains to the host…but how does the host know where my childsite1.com is? Normally for each domain with shared servers or VPS you need to set up a vhosts setting (shared being done for you in the background)
    I am guessing I still need to do this. SO what would a vhosts entry look like?
    I am actually keen to use nginx but am saying the apache way (vhosts) to be clear and simple.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi.
    On normal shared hosting you just add the domain as addon from cPanel and point it to the multisite folder. Then you change the site URL in the edit site page. I don’t know about vps stuff. The other option is explained in the link you posted (the thing with the A record).

    Thread Starter landed

    (@landed)

    Thanks nnikolov – the a records thing is what I think the vhosts setting does (don’t need it if you have a dedicated ip).
    I would ask that for this install that I inherited if I see no folders for each site on the server it still seems to work. It is set as a `define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);`

    For the vhosts settings here is a sample

    
    # Ensure that Apache listens on port 80
    Listen 80
    <VirtualHost *:80>
        DocumentRoot "/www/example1"
        ServerName www.example.com
    
        # Other directives here
    </VirtualHost>
    
    <VirtualHost *:80>
        DocumentRoot "/www/example2"
        ServerName www.example.org
    
        # Other directives here
    </VirtualHost>

    For WP multisite, all sites use the same WP instance. That means one DocumentRoot shared for all sites.

    For Apache httpd, you can have your httpd.conf be configured for all your WP sites; you dont really need separate VirtualHost configurations. Except for the case of SSL…you do need separate VirtualHost configurations to configure different SSL certificates.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How does a multi domain mapping work?’ is closed to new replies.