I'm having a problem configuring a vhost. It's for a Ruby on Rails application, the problem is the vhost is being accessed from every subdomain, not just the one i would like it assigned to. Here is my configuration.
<VirtualHost *:80>
ServerName appname.server.com
DocumentRoot /var/www/rails/appname
<Directory "/var/www/rails/appname/pu
blic">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Proxy balancer://mongrel_cluster
>
BalancerMember
http://127.0.0.1:8805 </Proxy>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
-d
RewriteRule ^(.+[^/])$ $1/ [R]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
\.php
RewriteRule ^(.*)$ $1 [QSA,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
!-f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
/index.htm
l -f
RewriteRule ^(.*)$ $1/index.html [QSA,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
!-f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
/index.php
-f
RewriteRule ^(.*)$ $1/index.php [QSA,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
-d
RewriteRule ^(.*)[^/]$ $1/ [QSA,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST
_FILENAME}
!-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster
%{REQUEST_
URI} [P,QSA,L]
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
php_value include_path /var/www/rails/appname/php
:/usr/loca
l/lib/php:
.
# php_value auto_prepend_file /var/www/rails/appname/php
/auto_prep
end.php
# this not only blocks access to .svn directories, but makes it appear
# as though they aren't even there, not just that they are forbidden
<DirectoryMatch "^/.*/\.svn/">
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
</VirtualHost>