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.

DNS redirection

Discussion in 'Security' started by datadata50, Jun 22, 2012.

  1. datadata50

    datadata50 Registered

    Joined:
    Jun 22, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    i have a question , i have a didicated server with cpanel , and i want for exemple when someone change the nameservers of the domain name to my namservers ns1.myhost.com and ns2.myhost.com it will show a page , because now it doesn't show anything only if the domain is added as account .

    Thank you
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure that's possible. If the domain is pointed at your server via nameservers at the registrar, and you have no actual account on the server where should it go?
     
  3. datadata50

    datadata50 Registered

    Joined:
    Jun 22, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    There is some hosting that when you change the namservers of the domain to their servers , it appears a default page with advertissement of the hosting .

    Cpanel shows the default web page only if a did an A record
     
    #3 datadata50, Jun 22, 2012
    Last edited: Jun 22, 2012
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    Check your httpd.conf to see if your domain is listed.

    Thanks!
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    In /usr/local/apache/conf/httpd.conf file, unbound domains have this entry:

    Code:
    <VirtualHost IP#:80>
        ServerName server.domain.com
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin email@domain.com
        <IfModule mod_suphp.c>
            suPHP_UserGroup nobody nobody
        </IfModule>
    </VirtualHost>
    In the above, IP# represents the main shared IP number, server.domain.com represents the server's hostname, and email@domain.com represents the email account for the root user.

    Because this points to /usr/local/apache/htdocs folder, it will load the index.html file in that folder, which has this in it:

    Code:
    root@host [/usr/local/apache/htdocs]# cat index.html
    <html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=/cgi-sys/defaultwebpage.cgi"></head><body></body></html>
    Simply revise that file to what you want, so if you want it to go to your domain name, put this instead:

    Code:
    <html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=http://mydomain.com"></head><body></body></html>
    Please replace mydomain.com with your domain name.

    I've tested changing this file before, and even on EasyApache recompile, we don't re-modify the file. You should be able to change it to go wherever you'd like.

    Thanks!
     
Loading...

Share This Page