[support] Multisite Broke After Drush 'archive-restore'

Earnie Boyd earnie at users.sourceforge.net
Mon Nov 19 12:53:33 UTC 2012


On Fri, Nov 16, 2012 at 9:21 PM, Kenneth Jacker <khj at be.cs.appstate.edu> wrote:
> *Warning*:  long reply!
>
>  >> I'd think if anything would "trigger" the "default" site (and its
>   >> associated "settings.php" file) content, it'd be coming in as a
>   >> non-DNS, bare IP address!
>   >>
>   eb> That depends on the httpd configuration, not really a Drupal
>   eb> issue.  The numeric address is getting remapped before Drupal sees
>   eb> the connection.
>
> To what and how is it being "remapped"?
>
> What aspect of Apache2 does this (I ask so that I might check there for
> more info/confirmation).
>

It is done in the config file.  There is a default DocumentRoot being
set somewhere in your config settings.  Since I don't have access to
those files it is difficult to be specific.


>   >> Though most of my testing has been with the IP address (pending the
>   >> movement of additional domain names to the new site) ...
>   >>
>   eb> I never test with the numeric address, instead I map the address to a
>   eb> planned site name in my client hosts file.  On Windows that file on my
>   eb> system is C:\Windows\system32\Drivers\etc\hosts and it uses the
>   eb> standard xx.xx.xx.xx SITE syntax.
>
> I could do that ... in Linux, where the file is /etc/hosts. So,
> something like this?
>
>        1.2.3.4  plannedsite.com
>

Yes.

>   eb> On the server side, I always set up the VHOSTs even though the
>   eb> public DNS hasn't been updated.
>
> Hmmm ... though as mentioned before I've had quite a bit of experience
> with kernels, networking, Apache, etc., I have done little with the
> "virtual hosting" part of 'httpd'.
>

It's not that difficult; Ubuntu sets it up by default.

> Might you suggest (if you have the time!) what VHOST "config lines" I'd
> add to /etc/apache2/apache2.conf (or maybe a file symbolically linked in
> /etc/apache2/sites-enabled) for my "plannedsite.com" example?
>

Well since you have sites-enabled you also have sites-available.  You
would create the file in sites-available and then use a2ensite "site
name" to enable it.  Maybe
http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2
would help you?

> Right now there is, I believe, only one virtual host with multiple
> "Directories" defined in between <VirtualHost *:80> ... </VirtualHost> tags.
>

This is the default.  If you have multiple DocumentRoots then that
isn't correct; I'm not sure what you mean by "multiple "Directories"".

>   eb> This way Drupal sees the correct site name because that is what I
>   eb> enter into the browser.
>
> So you mean you associate the bare IP address with the non-DNS
> registered domain name via a VirtualHost?  Is it possible that I'm
> beginning to understand this? !
>

Yes, the host name is mapped in the hosts file on the client, it
doesn't need to be on the server unless the server accesses the host
name for some reason.  Then a VirtualHost using the non-DNS registered
name is created and apache will DTRT.

>   >> Maybe something is cached in MySQL?
>
>   eb> Are you using differing databases for each site?
>
> Yes.  And each site's "settings.php" file defines the appropriate DB
> (which I verified was created via 'phpmyadmin').
>

Ok, good.

>   eb> You might check the sessions table, variable table and system
>   eb> table.
>
> No sure exactly what I'm looking for ;-), but will check those tables
> out later.
>
>   eb> Going to admin/modules and clicking the Submit button will action
>   eb> changes to the system table to correct data in that table.
>
> Maybe just an "operator error", but I see no "Submit" button when I
> bring up Drupal's "modules" page.
>

The big large button at the bottom of the module list; or the
"Enter/Return" button on your keyboard may do it by default.

>
> Sorry for the lengthy letter, but I am trying to give you (and other
> possible "lurkers") as much info as possible.
>
> And thanks very much for taking the time to help me.  :)
>

No problem, it's what I do.

>
>   -Kenneth
>
> PS  One thing that bothers me about all of this is that I didn't have to
>     use VHOSTs and the "hosts" file modification on the "source" site
>     (the one I "archived" with 'drush').  It works fine.  The problem is
>     with the "new" (duplicate) site created via a 'drush' restore.  The
>     first site works, but the second doesn't.
>

You would need to review the settings of the httpd daemon of the
source to determine how it was routing each site.

>     No matter.  I'm learning a lot through this discussion ...
>

We never quit doing that.

--
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the support mailing list