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.

Default page for server.

Discussion in 'General Discussion' started by MrVon, Nov 4, 2011.

  1. MrVon

    MrVon Member

    Joined:
    Nov 3, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have dedicated server on Godaddy when i go to it like https://111.222.333.444:2087/ it opens the WHM login but when i go to http://111.222.333.444/ it shows "Default Page" - "If you feel you have reached this page in error, please contact the web site owner" how can i change that page or add some domain that is on this ip address to be the main domain for the server?
     
  2. 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,

    You can fix this several ways but from WHM >> Main >> Account Functions >> Web Template Editor you can alter the default page.

    Thanks!
     
  3. MrAndreas

    MrAndreas Member

    Joined:
    Oct 31, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Is there way to display one of the accounts i have as default content for the ip address, i have that account on same ip address.
     
  4. 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
    Yes, you could edit /usr/local/apache/htdocs/index.html to have that redirect changed from the default page to your main site. The existing content will be the following:

    Change the "0;URL=/cgi-sys/defaultwebpage.cgi" portion to be "0;URL=http://mymaindomain.com/" instead where mymaindomain.com is your main domain you want to show for that IP address.
     
  5. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Tristan, will it get overwritten after an Apache update /rebuild?

    Thanks. I moved that to index2.html and added a index.php that uses the <domain name> on the title and coming soon message for dns only domains. I have no clients.

     
  6. 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
    There is no such thing under cPanel as an index.php page, so it wouldn't be overwritten.

    You are going to have index.html placed back onto the account if it has been moved. I suggest either putting the content into index.html or adding a /scripts/posteasyapache script to move index.html and recreate index.php when it gets recreated on EasyApache recompile:

    Code:
    #!/bin/bash
    
    mv /usr/local/apache/htdocs/index.html /root/index.html.`date +%Y-%m%d-%H%Mh%S`
    cp /root/index.php /usr/local/apache/htdocs/
    You'll likely need to "chmod +x /scripts/posteasyapache" for this to execute. You'll also need to place a copy of index.php into /root location for it to be copied to /usr/local/apache/htdocs folder.
     
  7. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Tristan,
    I have .php first in open-up order so I should be fine since it doesn't get deleted.

    I will copy the bash script though, just in case.
     
Loading...

Share This Page