Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th February 2009, 04:05
giftsnake giftsnake is offline
Senior Member
 
Join Date: Jan 2009
Posts: 108
Thanks: 15
Thanked 9 Times in 8 Posts
Default cname just directs to sharedip

creating a website on ispconfig (domain.com) creates A records for hostname www and a forwarding (edit: co-domain) without hostname.

i would like to create cnames, so that e.g. mail.domain.com gives the same result as www.domain.com gives. but: new cname, host 'mail' target 'www.domain.com' just shows up with the sharedip page.

the dns entry in wikipedia tells, that cname lookups will be solved to ips, but if a server uses namebased virtualhosts, the cname is looked up as hostname.

is it right that a cname directs to a different vhost than the target of the cname does? or is it just too simple for me to see?!

thanks!
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2009, 18:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

It might take up to 72 hours until DNS changes propagate, so you might have to wait a little bit longer.

BTW, you cannot use CNAMEs for MX record (I'm writing this because you made mail.domain.com a CNAME record).
__________________
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 4th February 2009, 20:34
giftsnake giftsnake is offline
Senior Member
 
Join Date: Jan 2009
Posts: 108
Thanks: 15
Thanked 9 Times in 8 Posts
Default

does it take up to 72 if i set my bind9 as nameserver of my client? i thought a simple /etc/bind9 restart could solve it...

i wanted to create the cnames like done in the guide (http://www.howtoforge.com/ispconfig_...domain_schlund) just for testing...

addressing mail.domain.com in the browser should direct me to www.domain.de, or is that wrong?
Reply With Quote
  #4  
Old 5th February 2009, 21:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Quote:
Originally Posted by giftsnake View Post
i thought a simple /etc/bind9 restart could solve it...
In this case this is true.

Can you post the zone file?
__________________
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
  #5  
Old 5th February 2009, 22:16
giftsnake giftsnake is offline
Senior Member
 
Join Date: Jan 2009
Posts: 108
Thanks: 15
Thanked 9 Times in 8 Posts
Default

in named.conf, the zonefile is set by:
Quote:
zone "domain.com" {
type master;
file "pri.domain.com";
};

the pri.domain.com file looks that way:

Quote:
cat pri.domain.com
$TTL 86400
@ IN SOA server2.somedomain.com. admin.domain.com. (
2009020510 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS server2.somedomain.com. ; Inet Address of name server 1
NS server2.somedomain.com. ; Inet Address of name server 2
;

MX 10 server2.somedomain.com.

domain.com. A 192.168.178.4
www A 192.168.178.4

web CNAME domain.com.
mail CNAME www.domain.com.

domain.com. TXT "v=spf1 a mx ptr ~all"

;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

looks all default to me :-/
Reply With Quote
  #6  
Old 6th February 2009, 19:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Looks ok. Can you post the vhost configuration?
__________________
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 6th February 2009, 20:18
giftsnake giftsnake is offline
Senior Member
 
Join Date: Jan 2009
Posts: 108
Thanks: 15
Thanked 9 Times in 8 Posts
Default

cat /etc/apache2/vhosts/Vhosts_ispconfig.conf
Quote:
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 192.168.178.4:80
<VirtualHost 192.168.178.4:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>
#
#
######################################
# Vhost: www.domain.com:80
######################################
#
#
<VirtualHost 192.168.178.4:80>
ServerName www.domain.com:80
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/web15/web
ServerAlias domain.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ErrorLog /var/www/web15/log/error.log
Alias /error/ "/var/www/web15/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>
#
#
Reply With Quote
  #8  
Old 7th February 2009, 17:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

You need to have mail.domain.com in the ServerAlias line of the vhost:
Code:
ServerAlias domain.com mail.domain.com
To do this, add a Co-Domain mail.domain.com to that web site in ISPConfig.
__________________
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
  #9  
Old 10th February 2009, 14:20
giftsnake giftsnake is offline
Senior Member
 
Join Date: Jan 2009
Posts: 108
Thanks: 15
Thanked 9 Times in 8 Posts
 
Default

works. thanks!
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
There is already a CNAME Record entry for this host in this zone. woleium General 1 24th October 2006 11:12
A name, CNAME and MX willebanks Server Operation 1 14th June 2006 01:55
Default Error Pages for sharedip vhost martinoc Feature Requests 1 1st June 2006 01:30
A Record, CNAME and MX records Help! willebanks Installation/Configuration 2 23rd April 2006 14:40
CNAME error jdjurici General 4 24th March 2006 09:50


All times are GMT +2. The time now is 18:52.


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