Drupal Multisite setup with CVS

Discussion in 'HOWTO-Related Questions' started by stkrzysiak, May 8, 2008.

  1. stkrzysiak

    stkrzysiak New Member

    hi everyone, new to the board, some help would be greatly appreciated....
    I have followed the excellent tutorial at http://howtoforge.com/multisite_drupal_installation_ubuntu almost exactly, but I am concerned it is not setup as it should be. My issue is that when I load one of my sites, it claims that the settings.php does not have the right permissions. This makes sense because it says the settings.php file in question is ./sites/default/settings.php when I expect is to be ./sites/www.example_1_or_2.com/settings.php where the tutorial says to set the a+w rights. My concern is that apache is not working with drupal correctly to direct to the site's respective directory.

    Before I go any further, it is Ubuntu 8.04 server, setup as a lamp. Other than the automated lamp setup, the only difference I can find is in my site conf files, I have :

    <VirtualHost *>
    ServerAdmin webmaster@localhost
    ServerName www.site1.com
    ServerAlias site1.com
    DocumentRoot /var/www/drupal/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/drupal/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    ServerSignature On


    </VirtualHost>

    As opposed to what the tutorial outlines:
    <VirtualHost *="">
    ServerAdmin serveradmin@example.com
    DocumentRoot /var/www/drupal
    <Directory>
    Options FollowSymLinks
    AllowOverride None
    </directory>
    <Directory var="" www="" drupal="">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </directory>
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    ServerSignature Off
    </virtualhost>

    If I use the <Directory var="" www="" drupal=""> as well as <VirtualHost *=""> I get the apache error stating that multiple directories are not supported (yet).

    Is this where my problem lies?? Why is apache not directing the request to the individual site's directory where it has it's own settings.php?

    Thanks in advance, and keep up the great work everyone!
     
  2. zcworld

    zcworld New Member

    NameVirtualHost *

    <VirtualHost *>
    ServerName sql.admin.lan
    DocumentRoot /var/www/vhosts/admin/sql
    CustomLog /var/www/logs/sql.admin.lan_access.log combined
    ErrorLog /var/www/logs/sql.admin.lan_error.log
    </VirtualHost>


    thats all i use


    give me an hour or two if no one else replys to do an test myself .... sorry ... i cant remember much ... ATM
     
    Last edited: May 8, 2008
  3. stkrzysiak

    stkrzysiak New Member

    k, thanks, but...

    That looks like a config for a standard site, right? Or is that how your sites are setup, do you host multiple sites in 'vhosts'?

    Did you do the drupal multisite setup as well?
     
  4. soniah

    soniah New Member

    Hey Stkrzysiak, thanks for your emails and comments about the HowTo. It's quite a while since I wrote it, so I'm going to have to dredge the details out of the depths of my brain (now there's a scary idea) and have a think about your question :)

    To help ppl who are reading this, would you mind showing the results of diffing your config with the suggested config? Also, grep out the contents of any logs that are showing any errors related to Apache.

    Thanks, Sonia.
    (author of "Multisite CVS Drupal Installation on Ubuntu")
     
  5. stkrzysiak

    stkrzysiak New Member

    logs...

    Soniah,
    Thanks for the quick response. The differences between your tutorial and my setup, as mentioned previously, is that a)I used the Ubuntu LAMP install feature(during the setup) and b)the apache 'default' file differs as posted.

    As for the error logs, well they show nothing pertinent to this, just the events from when I bring up apache and shut it down.

    The access log follows(after trying to open both pages, site1 & site2):

    tail access.log

    192.168.1.114 - - [09/May/2008:23:21:18 -0500] "GET /modules/system/system.css HTTP/1.1" 200 6932 "http://site1.com/install.php?profile=default" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:18 -0500] "GET /misc/druplicon.png HTTP/1.1" 200 4072 "http://site1.com/misc/maintenance.css" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /install.php HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /install.php?profile=default HTTP/1.1" 200 947 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /misc/favicon.ico HTTP/1.1" 200 5430 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /misc/maintenance.css HTTP/1.1" 200 1013 "http://site2.com/install.php?profile=default" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /modules/system/defaults.css HTTP/1.1" 200 737 "http://site2.com/install.php?profile=default" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /modules/system/system.css HTTP/1.1" 200 6932 "http://site2.com/install.php?profile=default" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

    192.168.1.114 - - [09/May/2008:23:21:24 -0500] "GET /misc/druplicon.png HTTP/1.1" 200 4072 "http://site2.com/misc/maintenance.css" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"


    I can't gather much from it. Seems like it is sending it to the drupal /var/www/drupal/ directory, as I directed it. I wish the method you used('var="" www="" ...etc' ) would work, because I think that may be the issue. But like I said, I get the 'multiple directories not accepted yet' error, or something along those lines....

    This could be a Drupal issue for all I know at this point. Maybe I will just build two virtual machines on this server instead...but I would rather do it your way, it seems much cleaner...

    In your original tutorial, what does the line:
    <Directory var="" www="" drupal=""> tell apache to do, and why doesn't it work with my apache(2.2.8)?

    Thanks for the help.....
     

Share This Page