Creating Web Template in cPanel
- Category : Server Administration
- Posted on : Sep 16, 2018
- Views : 1,914
- 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 :
/usr/local/apache/htdocs/index.php
/usr/local/apache/htdocs/index.cgi
/usr/local/apache/htdocs/index.pl
The default website template in EasyApache 4 is overridden by the following manually-created scripts:
/var/www/html/index.php
/var/www/html/index.cgi
/var/www/html/index.pl
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:
/var/cpanel/webtemplates/root/english/default.tmpl
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
Connection Selection
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.
Account Suspension
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’.
Conclusion
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.
Categories
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Jul 25
-
Posted on : Jul 07
-
Posted on : Apr 07
-
Posted on : Mar 19
Optimized my.cnf configuration for MySQL 8 (on cPanel/WHM servers)
Tags
- layer 7
- tweak
- kill
- process
- sql
- Knowledge
- vpn
- seo vpn
- wireguard
- webmail
- ddos mitigation
- attack
- ddos
- DMARC
- server load
- Development
- nginx
- php-fpm
- cheap vpn
- Hosting Security
- xampp
- Plesk
- cpulimit
- VPS Hosting
- smtp
- smtp relay
- exim
- Comparison
- cpu
- WHM
- mariadb
- encryption
- sysstat
- optimize
- Link Building
- apache
- centos
- Small Business
- VPS
- Error
- SSD Hosting
- Networking
- optimization
- DNS
- mysql
- ubuntu
- Linux