Changing The Default Web Templates for cPanel
- Written by Vanessa Vasile
- Published in Howto
- 3 Comments
- Permalink
cPanel currently has four templates that are visible to your users:
Default website: Appears to visitors who navigate to a site that points to the server but isn’t configured in Apache
Account move: Appears to visitors who navigate to a site that has moved
Connection selection: Appears to visitors who navigate to a site that is experiencing a connection or firewall problem
Account suspended: Appears to visitors who navigate to a site that has been suspended
You can modify the templates in WHM > Web Template Editor, but what if you have multiple servers you need to update templates for?
The templates are stored in a simple location:
/var/cpanel/webtemplates/$user/$language/$templatename.tmpl
$user : The reseller user (all accounts under this reseller will use its templates)
$language: The language in use for cPanel
$templatename: The name of the template, with .tmpl appended:
Default website: default.tmpl
Account move: moving.tmpl
Connection selection: redirect.tmpl
Account suspended: suspended.tmpl
This way, if you wanted to (for example) change all the suspended pages for accounts owned by root, simply drop your html code into the following file:
/var/cpanel/webtemplates/root/english/suspended.tmpl
The way cPanel works in regards to these templates, is to redirect all sites matching relevant situations (such as suspended websites) to a compiled CGI file in /usr/local/cpanel/cgi-sys:
movingpage.cgi
defaultwebpage.cgi
suspendedpage.cgi
redirect.cgi
The files load up the template and serve them to the visitor reaching the website or cPanel for the account in question.
3 Comments
I have 100+ domains but I dont want to use basic html template, whereas I need to use them under an account.
The article outlines how to change the template.
very important article….. thanks for sharing……