Tag Archives: cpanel

CPanel / WHM – Change “Default Website” Page

You may have noticed that when visiting a CPanel Server ( running WHM ) if you don’t have a site configured for the hostname that you are accessing ( or possibly if you are accessing the server via the IP address ) you will end up seeing the “default website” page, and your browser’s URL will redirect to defaultwebpage.cgi ( or /cgi-sys/defaultwebpage.cgi ) You may have searched your system and ended up finding something like this file: /usr/local/cpanel/cgi-sys/defaultwebpage.cgi However, that’s not just a plain HTML file – it’s a beefy binary cgi script. No editing is going to take place there! (nor should it) You may have also found the file that actually loads / redirects to the cgi script, which lives here: /usr/local/apache/htdocs/index.html However, I would not recommend customizing that file because it will get overwritten during a cPanel upgrade. So, what is the right way? Well it just so happens that in WHM there is a Web Template Editor that is meant for this very purpose: The Web Template Editor allows you to create placeholder web pages. These pages will appear to visitors who navigate to a site on your server that: Has not yet been configured by the domain owner (see the Default Website Page tab) Has moved (see the Account Move tab) Is experiencing a connection or firewall problem (see the Connection Selection tab) Has been suspended (see the Account Suspended tab) Info for the Default Website Template: You are editing the Default Website Template. This … Continue reading

Posted in Tech Tips | Tagged , | 2 Comments

Cpanel Set Default Webpage: defaultwebpage.cgi

On new cPanel servers if you try and access the site via IP or a domain name that does not yet have an account, you’ll be greeted with the Default Website Page response and redirected to /cgi-sys/defaultwebpage.cgi This is a little bit annoying because the page will set an expires time that is not immediate. That means in most browsers when you fix the error on your server (if you are the cPanel administrator) and try to check the site again, you’ll be automatically redirected to /cgi-sys/defaultwebpage.cgi and get the “Default Web Site Page” message even if your site has been correctly fixed. So that means you need to clear your browser’s cache each time it is messed up and you attempt a fix – this is a little annoying. What happens is that there is a default index.html file that uses meta refresh tag to forward you along to /cgi-sys/defaultwebpage.cgi The default index file is located at: /usr/local/apache/htdocs/index.html I’ve updated mine so it just displays an error on that page. You can even copy and paste the generated output from the defaultwebpage.cgi file into the index.html file (make a backup first if you’d like) and then the page will just show the error text and not redirect you to the cgi-bin directory and refuse to re-check the homepage without clearing the cache. Once you’re no longer being forwarded to the cgi-bin directory, you can just do some control+r or f5 to tell the browser to reload the page to … Continue reading

Posted in Tech Tips | Tagged | Leave a comment