<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Matt,<br><br>I don't fully understand the function of the serverName in the <VirtualHost ......> stanza. The only time I specify it is in a secure website specification. <br><br>When I configure virtual hosts I have some thing like<br> <VirtualHost virtualhostname:port><br> virtual domain configuration stuff goes here<br> </VirtualHost><br><br>The stanza<br> <VirtualHost *:80><br> .......<br> </VirtualHost><br>is for the default website that is not configured with any of the <VirtualHost> ....</VirtualHost> stanzas above it. Anything under it is just redundant which will never be accessed (well, with port 80, to be exact).<br><br>Long story short, one
solution you might try is to create a symbolic link to your<br> /home/drupal-commons/drupal_commons at /var/www/ with<br><br>ln -s /home/drupal-commons/drupal_commons /var/www/drupalsitename<br><br>and let the drupal site be accessed like the other Wordpress sites.<br><br>If your drupal site requires different configuration setting than the word press ones, then this will not work. You have to have a drupal virtual host stanza with <br><br> <VirtualHost drupalsite:80><br> configuration stuff<br> </VirtualHost><br>stanza above the default <VirtualHost *:80> stanza which happened to serve the WordPress sites.<br><br>HTH,<br><br>Equbay <br><br>--- On <b>Wed, 10/20/10, Matt Price <i><moptop99@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Matt
Price <moptop99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org><br>Subject: [TLUG]: maybe OT? apache configuration<br>To: "TLUG" <tlug-lxSQFCZeNF4@public.gmane.org><br>Received: Wednesday, October 20, 2010, 11:10 PM<br><br><div id="yiv355081985">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 rel="nofollow" ymailto="mailto:admin-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org" target="_blank"
href="/mc/compose?to=admin-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org">admin-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org</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>
</div></blockquote></td></tr></table><br>