The MU forums have moved to WordPress.org

Multiple MU installations under one domain (10 posts)

  1. delayedinsanity
    Member
    Posted 15 years ago #

    Is it possible?

    Here's the short: I installed WPMU under its own domain, using sub-domains for the blogs. Works great, but everything was moving along so swiftly that I was having to use this live install as my testing platform as well. I want to stop doing that ASAP, so that I don't bloat my database with orphans and possibly take down everybody's site while I'm in the midst of one of my nap times.

    So I'm hoping I can do this without buying another domain. I set up a new virtualhost, test.domain.tld and set the priority higher than my original MU installation, so that works fine. Exact same settings, just different directories on my server so that way I can mirror the install without hurting anybody.

    Untarred MU and ran through the 5 second install, installing to sub-domains. (I have wildcard support for *.test.domain.tld) This caused an endless redirection loop so I figured it must be the rewrite rules choking on two mu installs and reinstalled as a sub-directory set up. Still getting an endless redirection loop, I can view the front page, but I can't log in and do anything.

    Help?!

  2. delayedinsanity
    Member
    Posted 15 years ago #

    Update: Apparently I am logged in, I just can't get to wp-admin, so I'm going to go play with the rewrite rules.

  3. delayedinsanity
    Member
    Posted 15 years ago #

    *bump* Nobody out there has tried this?

  4. rohan_kapoor
    Member
    Posted 15 years ago #

    hey mate. Your problem is the way you have your server side set up. Let me see your virtual hosts file. Also make sure you are using different mysql databases.

  5. delayedinsanity
    Member
    Posted 15 years ago #

    I'm definitely using different mysql databases, the whole purpose of this endeavor is to set up a test server and attaching that to the live data would kind of defeat the purpose. ;)

    <VirtualHost *:80>
            ServerName test.domain.tld
            ServerAlias *.test.domain.tld
    
            DocumentRoot /var/www/test.domain.tld/
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/test.domain.tld/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            ErrorLog /var/log/apache2/domain.tld/test.error.log
            LogLevel warn
    
            CustomLog /var/log/apache2/domain.tld/test.access.log combined
    
    </VirtualHost>

    The main domain is pretty much identical, except for the obvious:

    <VirtualHost *:80>
            ServerName domain.tld
            ServerAlias *.domain.tld
    
            DocumentRoot /var/www/domain.tld/
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>;
            <Directory /var/www/domain.tld/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
    
            ErrorLog /var/log/apache2/domain.tld/error.log
            LogLevel warn
    
            CustomLog /var/log/apache2/domain.tld/access.log combined
    
    </VirtualHost>

    I'm running this on Ubuntu 9.04 with Apache 2 so the sites are enabled via links from the sites-enabled/ directory to sites-available/ and test.domain.tld has numerical precedence over domain.tld.

  6. andrea_r
    Moderator
    Posted 15 years ago #

    You know MU crawls up a directory to check for files? Usually that chokes the install.

    Hmmm....

    I just installed the beta today, locally, on a folder off one of my local domains with wpmu in the root. went fine.

  7. delayedinsanity
    Member
    Posted 15 years ago #

    Yeah, these two installs are in completely different directories on the server though, just under the same top level domain. That's part of the reason I'm mystified. Maybe I'll give it a go with the Beta, I was just hoping to have a near symmetrical mirror, but then again hopefully 2.8.1 is production ready soon anyhow.

  8. wpmuguru
    Member
    Posted 15 years ago #

    If you switched the test install to a subdir version then remove the *.test... server alias since you don't need it. Can you be more specific about the numerical precedence?

  9. vteixeira
    Member
    Posted 15 years ago #

    the best thing to do: just buy a domain. If you want you can find one on ebay for less than $4.00.
    Or just buy a new one for $7.99.

    It's really cheap.

  10. delayedinsanity
    Member
    Posted 15 years ago #

    @wpmuguru, my apache 2 installation is set up mildly different from the legacy model of httpd.conf. The new way, or at least the Debian/Ubuntu way is with four directories, sites-available/, sites-enabled/, mods-available/ and mods-enabled/. The *-available directories hold the actual configuration files, and the *-enabled/ ones hold symbolic links to whichever site or mod you want enabled. Sorry, long story short, if you attach a numerical value to the link filename, it sets the precedence for which file Apache will try to work with first, eg,

    $ ls
    001-test.domain.tld 002-domain.tld

    Will look in sites-available at test.domain.tld to see if it matches before moving on to domain.tld... The second ServerAlias does become redundant with the sub-directory install but shouldn't cause a conflict or the redirect loop either I'd think.

    @vteixeira, I probably will, but whenever I run into a problem, I like to solve it instead of circumvent it just to learn from the situation.

About this Topic

  • Started 15 years ago by delayedinsanity
  • Latest reply from delayedinsanity