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.

strange problem with a domain.

Discussion in 'General Discussion' started by NovemberRain, Oct 5, 2004.

  1. NovemberRain

    NovemberRain Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    İstanbul
    cPanel Access Level:
    Root Administrator
    hello

    I have a strange problem with one of my domains. I transferred the account from another webserver to my new webserver 1 or 1.5 year ago, using the cpanel transfer utility. It was an old build of cpanel. I don't remember the version exactly. But I think there were problems with account transfer script at that time. I transferred some accounts with current version and I have no problems.

    My problem is; my domain behaves like two separate domains.For example in /usr/local/apache/domlogs each domain's file name is like: xxx.com, yyy.com. But this domain has two log files. One is wwww.zzz.com the other is zzz.com. Other domains doesn't have log files starting with www.

    This causes many problems with the site. For example a member logs on the site with his username/pass using www.zzz.com but then if he enters using http://zzz.com the site sees him as unkown user. He has to log in to http://zzz.com also. Both domains behave diffrently.

    If I look at the http referers of the domain, the list is full of http://zzz.com, or http://www.zzz.com, the domain itself. For example you are viewing a forum message and there is a link to another forum post in that message, you are viewing the page from http://zzz.com/forummpost1.php, but the link is http://www.zzz.com/forumpost2.php then that page becomes a referer, like coming from a diffrent site. So the http referers list is full of referers coming from the same domain.

    I hope I could explain the problem. Sorry for my English.

    Do you have any ideas? Any help would be greatly apprecieted.
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Sounds like the www is actually a subdomain instead of just a symbolic link.

    In shell, get a directory listing of the domains root.

    cd /home/username
    ls -l

    You should see something like:

    Code:
    drwxrwx---   11 username  mail         4096 Oct  5 01:44 mail/
    drwxr-xr-x    3 username  username       4096 Aug 30  2003 public_ftp/
    drwxr-x---   22 username  nobody       4096 Aug 31 21:56 public_html/
    lrwxrwxrwx    1 username  username         11 Dec  2  2003 www -> public_html/
    
    Also check your httpd.conf file in the VirtualHost entry for that domain and see if you have:
    ServerAlias www.domain.com domain.com
     
  3. NovemberRain

    NovemberRain Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    İstanbul
    cPanel Access Level:
    Root Administrator
    Thanks for the reply. This is the output I get:


    Code:
    root@host [/home/username]# ls -l
    total 116
    drwx--x--x   16 username username     4096 Oct  5 14:20 ./
    drwx--x--x   60 root     root         4096 Oct  5 12:35 ../
    -rw-------    1 username username      957 Nov 23  2003 .accesshash
    -rw-------    1 username username     9383 Jul 25 17:05 .bash_history
    -rw-------    1 username username       17 Oct  2 10:13 .contactemail
    drwx------    3 username username     4096 Jul  8 04:37 .cpanel/
    drwxr-xr-x    4 username username     4096 Nov 23  2003 cpanel3-skel/
    drwxr-xr-x    6 username username     4096 Nov 23  2003 cpanelbranding/
    -rw-------    1 username username    16107 Sep  1 22:25 .cpanel-ducache
    drwxr-x---    9 username mail         4096 Sep 10 16:04 etc/
    drwxr-xr-x    2 username username     4096 Aug 27 07:20 .fantasticodata/
    -rw-r--r--    1 username username       88 Mar 27  2004 .filter
    drwx------    2 username username     4096 Sep  2 21:13 .gnupg/
    drwxr-xr-x    2 username username     4096 May  8 17:41 .htpasswds/
    -rw-------    1 username username       13 Oct  2 10:22 .lastlogin
    drwxrwx---   15 username mail         4096 Sep 10 14:02 mail/
    -rw-r--r--    1 username username       36 Aug  7  2003 .mailboxlist
    drwxr-xr-x    3 username username     4096 Oct  3  2003 public_ftp/
    drwxr-x---   20 username nobody       4096 Sep  9 15:06 public_html/
    drwx------    2 username username     4096 Sep  2 04:07 .spamassassin/
    -rw-------    1 username username       24 Sep  2 04:56 .spamkey
    drwx------    3 username username     4096 Sep  2 21:13 ssl/
    drwx------    6 username username     4096 Sep 12 16:13 tmp/
    drwx------    3 username username     4096 Jul 22 17:09 .trash/
    lrwxr-xr-x    1 username username       11 Aug 27 06:52 www -> public_html/
    In httpd conf there was no ServerAlias www.domain.com domain.com
    Instead it was ServerAlias domain.com www.domain.com but I changed it to the one you say. I restarted apache and tried again. Everything is same. It isn't fixed.

    My current httpd conf entry is like this:

    Code:
    <VirtualHost XX.XXX.XXX.>
    ServerAdmin xxx@xxx.com
    DocumentRoot /home/username/public_html
    php_admin_flag safe_mode Off
    BytesLog domlogs/domain.com-bytes_log
    ServerName www.domain.com
    ServerAlias www.domain.com domain.com
    User username
    Group username
    <IfModule mod_userdir.c>
    UserDir disabled
    UserDir enabled username
    </IfModule>
    CustomLog domlogs/domain.com combined
    ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
    
    </VirtualHost>
    Anything wrong here?
     
    #3 NovemberRain, Oct 5, 2004
    Last edited: Jun 4, 2005
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That looks ok. I think the next thing to check would be the domain.db file in /var/named.

    See if it includes
    www IN CNAME domain.com.
     
  5. NovemberRain

    NovemberRain Well-Known Member

    Joined:
    Sep 24, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    İstanbul
    cPanel Access Level:
    Root Administrator
    Yes there is :(

    www 14400 IN CNAME domain.com.
     
Loading...

Share This Page