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.

Subdomain of Parked domain suddenly not working

Discussion in 'General Discussion' started by ensermo, Oct 13, 2005.

  1. ensermo

    ensermo Active Member

    Joined:
    Apr 24, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Delft
    Dear Users/Support,

    I have a domain: maindomain.com
    On top of that domain I parked the domain: parkeddomain.com

    This was working without problems.
    After some time I went in CPanel and went to "Sub Domain Maintenance".

    There I added two subdomains

    forum.maindomain.com and forum.parkeddomain.com

    Both where redirected to http://maindomain.com/forum/

    These subdomains have been working for some time without problems.
    Suddenly about a week ago the subdomain of parkeddomain.com stopped working.
    (The subdomain of maindomain.com is still working)

    My current WHM/CPanel is
    WHM 10.6.0 cPanel 10.8.0-S59
    RedHat 9 i686 - WHM X v3.1.0


    I have tried solve the problem: (changed domainnames and ip's)

    1.in /etc/httpd/conf/httpd.conf the entries are there

    <VirtualHost 123.123.123.123>
    BytesLog domlogs/forum.maindomain.com-bytes_log
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/maindoma/:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    ServerName forum.maindomain.com
    ServerAlias www.forum.maindomain.com
    ServerAdmin wwwadmin@maindomain.com
    DocumentRoot /home/maindoma/public_html/forum
    CustomLog domlogs/forum.maindomain.com combined
    ScriptAlias /cgi-bin/ /home/maindoma/public_html/forum/cgi-bin/
    User maindoma
    Group maindoma
    </VirtualHost>

    and

    <VirtualHost 123.123.123.123>
    ServerAlias www.forum.parkeddomain.com
    ServerAdmin webmaster@forum.parkeddomain.com
    DocumentRoot /home/maindoma/public_html/forum
    BytesLog domlogs/forum.maindomain.com-bytes_log
    ServerName forum.maindomain.com

    2. The file /var/cpanel/users/maindoma exists.
    BWLIMIT=5242880000
    DNS=maindomain.com
    FEATURELIST=default
    IP=123.123.123.123
    LANG=english
    MAXADDON=5
    MAXFTP=5
    MAXLST=1
    MAXPARK=5
    MAXPOP=10
    MAXSQL=5
    MAXSUB=25
    OWNER=root
    PLAN=MKE050
    RS=x2
    STARTDATE=1092063011
    DNS1=parkeddomain.com
    DNS2=maindomain.nl
    DNS4=forum.maindomain.com
    DNS5=sub.maindomain.com
    DNS6=abc.maindomain.com
    DNS7=test1.maindomain.com
    XDNS1=parkeddomain.com.sub.maindomain.com
    XDNS2=test1.parkeddomain.com
    DNS8=forum.parkeddomain.com

    3. I tried running the command
    /scripts/updateuserdomains
    and
    /scripts/updateuserdomains2

    Nothing happens.

    4. Restared Apache, DNS etc.

    Internally (between servers on the cluster) I am able to ping everything but outside not.

    This just stopped working all of a sudden.

    Any ideas?

    Thank in advance.
     
    #1 ensermo, Oct 13, 2005
    Last edited: Oct 13, 2005
  2. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    What is the error that you get while browsing forum.parkeddomain.com
     
  3. ensermo

    ensermo Active Member

    Joined:
    Apr 24, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Delft
    It isn't found. Timed Out. Like the DNS isn't set. But it is allright in the DNS.
     
  4. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Well can you ping forum.parkeddomain.com from your computer, If no then it has to be a DNS issue and not Cpanel issue.

    Try recreating the park and its subdomain.
     
  5. ensermo

    ensermo Active Member

    Joined:
    Apr 24, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Delft
    I deleted and recreated the subdomain yesterday evening. Today I tried loading the webpage and now I am seeing the following error.

    url: http://forum.parkeddomain.com

    Forbidden
    You don't have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.33 Server at forum.parkeddomain.com Port 80

    Seems like something went wrong in the httpd.conf I think.. or is it somewhere else?
     
  6. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Does the park domain work fine... or it is just the subdomain.

    It would be more helpful if you could paste the virtualHost Entry for the prakdomain
     
  7. ensermo

    ensermo Active Member

    Joined:
    Apr 24, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Delft
    The parked domain is working perfectly. When putting parkeddomain.com in the browser it will automatically give the output of the site but still show parkeddomain.com in the url (even when clicking links as long as they are relative ./link.htm ./contact.htm etc)

    This is the only place where parkeddomain.com is found in /etc/httpd/conf/httpd.conf

    <VirtualHost 123.123.123.123>
    ServerAlias www.maindomain.com maindomain.com
    ServerAdmin webmaster@maindomain.com
    DocumentRoot /home/maindoma/public_html
    BytesLog domlogs/maindomain.com-bytes_log
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/maindoma/:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    ServerName www.maindomain.com
    ScriptAlias /cgi-bin/ /home/maindoma/public_html/cgi-bin/
    ServerAlias parkeddomain.com www.parkeddomain.com
    ServerAlias otherdomain.cc www.otherdomain.cc
    User maindoma
    Group maindoma
    CustomLog domlogs/maindomain.com combined
    </VirtualHost>

    And this one

    <VirtualHost 123.123.123.123>
    ServerAlias www.forum.parkeddomain.com
    ServerAdmin webmaster@forum.parkeddomain.com
    DocumentRoot /home/maindoma/public_html/forum
    BytesLog domlogs/forum.parkeddomain.com-bytes_log
    ServerName forum.parkeddomain.com
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/maindoma:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/home/maindoma:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    User maindoma
    Group maindoma
    CustomLog /usr/local/apache/domlogs/forum.parkeddomain.com combined
    ScriptAlias /cgi-bin/ /home/maindoma/public_html/forum/cgi-bin/
    </VirtualHost>

    It all seems ok to me.
    - DNS for maindomain.com, parkeddomain.com point to the correct ip (123.123.123.123)
    - There is a A record in the DNS entry for forum of parkeddomain.com
    forum 14400 A 123.123.123.123
    www.forum 14400 A 123.123.123.123
    - The Virtualhost is correct for forum.parkeddomain.com
    - The DocumentRoot for forum.parkeddomain.com points to the correct path
    - The users exist and own the directories.

    Hmm.. Did I miss something?

    **** Edited ***
    There is a .htaccess file in
    /home/maindoma/public_html/forum
    with

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^forum.maindomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.forum.maindomain.com$
    RewriteRule ^(.*)$ http://maindomain.com/forum/$1 [R=301,L]

    Could that be it?
     
    #7 ensermo, Oct 14, 2005
    Last edited: Oct 14, 2005
  8. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Yup maybe it is the .htaccess file as it has the REWRITE RULE set..
    Just rename it as .htaccess.bak.. I think that should fixed..

    And Parked domains are frame forwarders hence no matter what URL you are visiting on the main domain it will show only http://parkdomain.com in the browser.
     
  9. ensermo

    ensermo Active Member

    Joined:
    Apr 24, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Delft
    Murtaza_t thanks for helping me on this one.
    I finally solved it by putting this in the .htaccess file

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^forum.mainsite.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.forum.mainsite.com$
    RewriteRule ^(.*)$ http://mainsite.com/forum/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^forum.parkedsite.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.forum.parkedsite.com$
    RewriteRule ^(.*)$ http://mainsite.com/forum/$1 [R=301,L]

    Even though the question remains... how did it break in the fist place!
     
Loading...

Share This Page