maybe OT? apache configuration

Matt Price moptop99-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Thu Oct 21 03:10:05 UTC 2010


Hi folks,

ok, so I have an ubuntu server running multiple wordpress sites; so I have
the file wordpress-sites in /etc/apache2/sites-available, containing the
following fairly straightforward code:

-------------------
## Virtual host
VirtualDocumentRoot


        <Directory
/>
            Options
FollowSymLinks
            AllowOverride
All

</Directory>


        <VirtualHost
*:80>
        UseCanonicalName
Off
        VirtualDocumentRoot
/var/www/%0
        Options
All
        #ServerAdmin admin-hcDgGtZH8xNBDgjK7y7TUQ at public.gmane.org



        # Store uploads in
/var/www/wp-uploads/$0
        RewriteEngine
On
        RewriteRule ^/wp-uploads/(.*)$
/var/www/wp-uploads/%{HTTP_HOST}/$1


        </VirtualHost>
------------------------

now I would like to try a drupal site on the same server (actually, the
drupal commons install profile).  This works fine with the following code in
/etc/apache2/conf.d/drupal-commons:
---------------------------
Alias /drupal-commons /home/drupal-commons/drupal_commons

<Directory /home/drupal-commons/drupal_commons>
    Options +FollowSymLinks
    AllowOverride All
    order allow,deny
    allow from all
</Directory>

------------------------------

except, of course, that this makes the default drupal site show up as a
subdirectory of any site mapped to the server!  not what I want.  The
problem is that I can't see how to combine the dynamic virtual host method
with old fashioned static virtual hosts, e.g. like this:
        <VirtualHost
*:80>
        DocumentRoot
/home/drupal-commons/drupal_commons
        ServerName drupal.commons.site.hostname


</VirtualHost>

but, and here's my problem, if I put this stanza below the dynamic stanzas I
already have, then they're pre-empted by the *wildcard blogging; but if I
put the new stanza ahead of the old dynamic stuff, _SURPRISE_, now any site
hosted at this ip address suddenly get served up the drupal commons site!
i don't really understand why that happens -- surely the ServerName
directive is supposed to limit the application of the <VirtualHost>
directive?  Can anyone offer me any guidance?

Thanks as always,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20101020/86f240ed/attachment.html>


More information about the Legacy mailing list