cPanel WHM
[Fixed] Template Error: The template file must be given
The website might throw error as follows hosted on cPanel control panel
Template Error: The template file must be given.
and you may wonder whats gone wrong suddenly with the website.
The fix to the problemĀ is very easy.
The problem occurs when the IP in virtualhost entry of Apache configuration file is messed up.
1) Login in server as a root user through SSH.
2) Check the IPs present on server
# ifconfig
3) Check the IP present the httpd.conf files and virtualhost entry for the domain
4) Correct the entries of the IP, save the file and restart Apache.
5) Check the IPs present in cPanel files like
# /var/cpanel/usedata/username
# var/cpanel/userdatadomains/
and correct the entry of IPs if required using commands like replace.
6) Restart cPanel