#1  
Old 7th December 2007, 23:31
Jshel Jshel is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default can bind point to a dir?

I'm running fedora core 7 with bind 9. I host a www server and mail server on the same machine with webmail. I would like mail.domain.com to go directly to the webmail and not my default webpage. I understand DNS and I'm familiar enough with bind to be able to get around. But I just can't figure out how to have mail.domain.com pull domain.com/webmail
Thank you for your time,
Joe
Reply With Quote
Sponsored Links
  #2  
Old 8th December 2007, 13:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

You can do this with an Apache rewrite rule (see http://httpd.apache.org/docs/2.2/misc/rewriteguide.html ), or you create a new vhost for mail.domain.com in Apache (pointing to your existing webmail directory).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 12th November 2008, 07:17
Jshel Jshel is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Issue setuping up Vhost

A while ago i setup a web and mail server and used a Vhost to point mail.domain.com to the webmail dir. I am in the process of redoing the
server due to a dead hard drive. My httpd.conf file has this entry

<virtualhost mail.domain.com>
ServerName mail.domain.com
DocumentRoot /var/www/html/webmail
</virtualhost>

I have tried multiple configs from the apache site and i'm ready to shot myself in the head. (figure of speech ONLY)
When i have it setup (what i believe is correct) domain.com and mail.domain.com go to the same darn place "DOMAIN.COM"
I'm spacing something really simple i know but hell if i can find it.
Any help would be greatly appreciated. Thank you in advance.
JSHEL
Reply With Quote
  #4  
Old 12th November 2008, 15:31
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

What does your browser show when you go to mail.domain.com ?
any errors about the setup in the apache or syslog logs?
Reply With Quote
  #5  
Old 13th November 2008, 08:56
Jshel Jshel is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If i go to mail.domain.com the browser just brings up domain.com, and i'm not getting anything in the logs what so ever. No error starting httpd either. I have turned on debug. I'll post some of the logs tomorrow at work. I really appreciate the help. Thank you.
Reply With Quote
  #6  
Old 13th November 2008, 14:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Can you post the vhost configurations of mail.domain.com and domain.com? What's the output of
Code:
ifconfig
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 13th November 2008, 17:09
Jshel Jshel is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Morning,
I figured it out. I pulled my head out of the box and realized i was for getting to put in the (NameVirtualHost *:80) directive. all is running well now.
for anyone else you must have these entrys

NameVirtualHost *:80

<virtualhost *:80>
servername domain.com
documentroot /some/dir
</virtualhost>

<virtualhost *:80>
servername mail.domain.com
documentroot /some/dir/webmail_dir
</virutalhost>

Thank you for everyones help on this issue.
Reply With Quote
  #8  
Old 13th November 2008, 22:07
martien martien is offline
Junior Member
 
Join Date: Oct 2007
Posts: 26
Thanks: 2
Thanked 2 Times in 2 Posts
 
Default

You can also add cname record for your mail.domain.com and then in your webmail vhost (webmail.domain.com for example) you can add
Code:
ServerAlias mail.domain.com mail2.domain.com
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Problem on restart bind9 satimis Server Operation 6 30th October 2007 02:01
ISPConfig 2.2.14 released till General 48 19th July 2007 23:46
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48
Bind-Chroot-Howto (Debian) spaz HOWTO-Related Questions 5 9th March 2006 14:50


All times are GMT +2. The time now is 07:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.