Hi folks,<br><br>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:<br><br>-------------------<br>
## Virtual host VirtualDocumentRoot <br> <br> <Directory /> <br>
Options FollowSymLinks <br> AllowOverride All <br> </Directory> <br>
<br> <VirtualHost *:80> <br> UseCanonicalName Off <br>
VirtualDocumentRoot /var/www/%0 <br> Options All <br> #ServerAdmin <a href="mailto:admin@example.com">admin@example.com</a> <br>
<br> # Store uploads in /var/www/wp-uploads/$0 <br> RewriteEngine On <br>
RewriteRule ^/wp-uploads/(.*)$ /var/www/wp-uploads/%{HTTP_HOST}/$1 <br> <br> </VirtualHost> <br>------------------------<br>
<br>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:<br>---------------------------<br>
Alias /drupal-commons /home/drupal-commons/drupal_commons<br><br><Directory /home/drupal-commons/drupal_commons><br> Options +FollowSymLinks<br> AllowOverride All<br> order allow,deny<br> allow from all<br>
</Directory><br><br>------------------------------<br><br>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:<br>
<VirtualHost *:80> <br> DocumentRoot /home/drupal-commons/drupal_commons <br> ServerName drupal.commons.site.hostname <br>
</VirtualHost> <br><br>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! <br>
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?<br><br>Thanks as always,<br>Matt<br>
<br>