The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

wrong domain showing up

Discussion in 'General Discussion' started by anand, May 16, 2005.

  1. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I have a very strange problem in hand on a box.

    We have a domain setup on a windows box and its MX is pointed to the cpanel box, so mail.domain.com comes to the cpanel box.

    The dns file for the domain.com on the cpanel box is as follows:

    Code:
    ; Modified by Web Host Manager
    ; Zone File for domain.com
    $TTL 900
    @       14440   IN      SOA     ns1.serverone.com.     admin.serverone.com.   (
                                            2004112302
                                            14400
                                            7200
                                            3600000
                                            86400
                                            )
    
    domain.com.       900     IN      NS      ns1.serverone.com.
    domain.com.       900     IN      NS      ns2.serverone.com.
    
    domain.com.       900     IN      A       1.1.1.1
    
    localhost.domain.com.     900     IN      A       127.0.0.1
    
    domain.com.       900     IN      MX      0       domain.com.
    
    mail    900     IN      A       1.1.1.1
    www     900     IN      A       1.1.1.1
    ftp     900     IN      A       1.1.1.1
    
    The httpd.conf entry for the above domain is as follows:

    Code:
    <VirtualHost 1.1.1.1>
    ServerAlias www.domain.com mail.domain.com
    ServerAdmin webmaster@domain.com
    DocumentRoot /home/domain/public_html
    BytesLog domlogs/domain.com-bytes_log
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/domain/:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    ServerName mail.domain.com
    ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/
    User domain
    Group domain
    CustomLog domlogs/domain.com combined
    </VirtualHost>
    
    Now when anyone types on mail.domain.com on a browser it is redirected to the first domain which is setup on the ip 1.1.1.1. If i recall correctly this should not happen, it should open the page located at /home/domain/public_html directory.

    Can anyone point out what could be the wrong here ?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Just typed a whole lot about ServerAliases and IP addresses and then noted your VirtualHost directive. How odd. Do you have a NameVirtualHost directive before any VirtualHost directives for 1.1.1.1?
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    hmm let me check...


    Edit: Nope its not there. This is box where httpd.conf hasn't been hand edited ever. Could it be the way wwwacct now makes account and doesn't insert those directives ?
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Added the directive, still the same case.
     
  5. ccccanada

    ccccanada Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    Hello anand!

    Is the domain name pointing to the windows server DNS or the Cpanel Servers DNS??

    If it is pointing to Windows then your DNS entry in Cpanel should look like the one below.

    mail.domain.com. 900 IN NS ns1.cpanelserver.com.
    mail.domain.com. 900 IN NS ns2.cpanelserver.com.

    mail.domain.com. 900 IN A 1.1.1.1

    localhost.domain.com. 900 IN A 127.0.0.1

    mail.domain.com. 900 IN MX 0 mail.domain.com.
     
Loading...

Share This Page