Creating Web Template in cPanel
- Category : Server Administration
- Posted on : Sep 16, 2018
- Views : 1,737
- By : Ethan R.
The placeholder pages which you have created for a specific account will appear for just the site of that account. For example, if you create placeholder pages for your root account, these will not appear for the sites owned by the reseller.
Things to remember while configuring a Template
The Web Template Editor interface gives the access to create placeholder web pages. People will see these pages while visiting a site on your server if it matches any one of the following conditions:
- The site has not been configured by the owner yet, or there is absence of an owner for the site on your server.
- The domain addresses an incorrect IP address.
- The site has been move to some other address.
- The site has any kind of problem regarding connection or firewall.
- The owner has suspended the site from being accessed.
Only those accounts for which the placeholder pages have been created will be affected. To create a template, the steps written underneath are to be followed:
- The images must be stored in the directory named /usr/local/img-sys/directory and the directory img-sys is to be used to link to them.
- [%data.protocol%] tag is to be used when you are linking to images or files outside of the img-sys directory as a substitute for http or https.
- If you redirect a domain, the placeholders pages cannot be seen by the visitors. To make it possible for visitors to see the actual Website pages, the finished pages should be copied from the /var/cpanel/webtemplates/root/English/ directory to the /home/username/public_html directory of the destination domain.
There are several types of Template, used for different purposes. Such as :
Default Website Pages:
The Default Website page appears only when any of the following statements are true:
- This site has not been published by the owner.
- The site has been deleted by the owner.
- The domain points to an incorrect IP address.
- The domain addresses to not any cPanel accounts.
The default website template in EasyApache 3 is overridden by the following manually created scripts :
The default website template in EasyApache 4 is overridden by the following manually-created scripts:
The files may also be place in the skeleton directory to load a default page for new accounts.
The location of this template is within the following directory:
To move an Account
This template appears when a site has been moved. The location for this template within the directory is: /var/cpanel/webtemplate/root/English/moving.tmpl
This template appears only if there is a firewall connection problem. In addition to the [%data.protocol%] tag, following tags can also be used for the configuration if this template :
- [%data.ishttps%]– Inserts 1 if site has been accessed by the visitor through a secure port (for example 2083,2087 or 2096),or 0 if the visitor uses some other port.
- [%data.port%]– Inserts the cPanel port number.
- [%data.js_safe_redirecturl%]– The URL of the domain’s cPanel interface is inserted.
- [%data.js_safe_redirectural%]– Inserts the URL of the cPanel proxy.
Within the “/var/cpanel/webtemplates/root/English/redirect.tmpl” directory, this template is located.
This template appears if the site has been suspended by the owner or the root user. It is located within the “/var/cpanel/webtemplates/root/english/suspended.tmp” directory.
How to Edit a Template File:
One needs to perform the following steps to modify a template file within WHM interface. :
- First, the tab corresponding to the template which is to be changed is to be selected.
- Make the changes you wish to make.
- To check the changes before proceeding, click Preview.
- Click on Save.
- To return to the recent version of the template, click on Revert.
- To cancel the changes, click on Revert to Default.
How to Upload a Template File:
In order to upload a custom website template, these steps must be followed:
- The tab should be selected first which corresponds to the template which has to be edited
- Select the option ‘Choose File’ under the menu box ‘Upload Your Own Template’.
- On your local computer browse to the template file.
- Click on the option ‘Upload Template’.
The provision to create Web Templates files helps Website owners mitigate the downtime negativity associated with a domain migration, account suspension, etc. In the midst of severe competition, shutting down the website without any custom page could affect the brand credibility.
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!
Posted on : Sep 17
Posted on : Sep 10
Posted on : Aug 04
Posted on : Apr 01
- server load
- ddos mitigation
- layer 7
- seo vpn
- Hosting Security
- smtp relay
- VPS Hosting
- cheap vpn
- Small Business
- SSD Hosting
- Link Building