httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tyju tiui <>
Subject Re: [users@httpd] Virtual Hosts in 2.2
Date Tue, 30 Jan 2007 02:40:14 GMT
Hi Jay,

I think you should change '*' to ''
What you are trying to accomplish with the '*' should actually be done with something
called a dns wildcard. The dns wilcard is a standard setup for most hosting companies these
days I believe, otherwise you might need to have your network admin setup the wildcard entry
for you. Basically it just points all sub-domains back to the root domain unless explicitly
stated otherwise.

Then, you can use Apache vhost config to route traffic once it arrives at your server based
on the requesting URL (as you did with the '' vhost entry).

If you don't have access to your dns setup you can also accomplish this using mod_rewrite
(assuming you have mod_rewrite). Just put an entry in a .htaccess at the docroot like so:

RewriteEngine On

RewriteCond %{HTTP_HOST}
RewriteRule ^(.*)$ /usr/local/www/squirrelmail/$1

This is just an example and would probably vary a little based on your setup.
You can read more at:

Good Luck!

----- Original Message ----
From: Jay Chandler <>
Sent: Monday, January 29, 2007 8:10:08 PM
Subject: [users@httpd] Virtual Hosts in 2.2

Attempting to set up my virtual hosts so that goes to 
the normal DocumentRoot, and goes to my squirrelmail 

Contents of extra/httpd-vhost.conf:

 NameVirtualHost *:80

<VirtualHost *:80>
ServerAlias *
DocumentRoot /usr/local/www/apache22/data

<VirtualHost *:80>
DocumentRoot /usr/local/www/squirrelmail

Yet, my a request to goes to the documentroot for Apache.


Jay Chandler
Network Administrator, Chapman University
714.628.7249 /
Today's Excuse: Secretary sent chain letter to all 5000 employees. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
View raw message