httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tyju tiui <jckdnk...@yahoo.com>
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 '*.haderach.net' to 'www.haderach.net'
What you are trying to accomplish with the '*.haderach.net' 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 'mail.haderach.net' 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} mail.haderach.net
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: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Good Luck!



----- Original Message ----
From: Jay Chandler <chandler.lists@chapman.edu>
To: users@httpd.apache.org
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 www.haderach.net goes to 
the normal DocumentRoot, and mail.haderach.net goes to my squirrelmail 
folder.

Contents of extra/httpd-vhost.conf:

 NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.haderach.net
ServerAlias haderach.net *.haderach.net
DocumentRoot /usr/local/www/apache22/data
</VirtualHost>

<VirtualHost *:80>
ServerName mail.haderach.net
DocumentRoot /usr/local/www/squirrelmail
</VirtualHost>

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

Help?

-- 
Jay Chandler
Network Administrator, Chapman University
714.628.7249 / chandler@chapman.edu
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org








 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
Mime
View raw message