hi gf3,
If I got the situation right, now you had (as mentioned) 2 Vhosts configured
Vhost#1
ServerName appname.server.com
DocumentRoot /var/www/rails/appname
Vhost#2
ServerName devo.server.com
DocumentRoot /var/www-devo
How does the Vhost appears in the apache config. I mean the order. devo then appname, or appname then devo. Reason for asking this is -- apache would
http://httpd.apache.org/do
>> f no matching virtual host is found, then the first listed virtual host that matches the IP address will be used.
you could do a
httpd -t -D DUMP_VHOSTS
to list the vhosts and how the are ordered.
Once you had identified that, reorder, or set the appropriate ServerName of ServerAlias directive in the respective Vhost container according to the names it is suppose to appear in the URL. Since you had the rewrite directive in one of the vhost (appname), do ensure that the resulting rewritten URL -- and ensure that it conform to the desired Vhost. Remember that anything that does not match any configured vhost would be served by the first configured Vhost.
HTH.
Main Topics
Browse All Topics





by: gf3Posted on 2007-10-01 at 18:29:39ID: 19995724
OK I got that junk working! But I have a different problem now. I have configured another VHost, works great. The only problem is everything is served from that VHost and not the document root. Here is my VHost configuration:
.com-error _log .com-acces s_log common
<VirtualHost *:80>
ServerName devo.server.com
DocumentRoot /var/www-devo
ServerAdmin gianni@server.com
ErrorLog /var/log/httpd/devo.server
CustomLog /var/log/httpd/devo.server
RewriteEngine On
<Directory /var/www-devo>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>