Symptoms
You receive an email notification with a subject similar to "The system detected that one or more templates were updated as a result of a change in the EasyApache 4 environment."
Description
This occurs due to EasyApache 4 updates changing the default template, this means that custom templates may need to be updated in order to follow suit.
Workaround
You will want to review the following directory to look for a custom template, usually called ea4_main.local or will have ".local" somewhere in the name. You can do so by using the "ls" command to find the file.
ls -l /var/cpanel/templates/apache2_4/*.local
If you find such a file, you will want to back it up prior to making changes. For example.
cp -a /var/cpanel/templates/apache2_4/ea4_main.local /var/cpanel/templates/apache2_4/ea4_main.local.backup
You can then use the diff command to look for differences between the default template and the custom one you have in place as in the example below. You will want to make sure you are editing the .local files and not the .default files as the .default files may be overwritten by cPanel updates.
diff -u /var/cpanel/templates/apache2_4/ea4_main.default /var/cpanel/templates/apache2_4/ea4_main.local
After making any changes to the .local files, you want to run the following command and ensure it does not throw any errors.
/scripts/rebuildhttpdconf
If it run successfully, you can restart Apache with the following command.
/scripts/restartsrv_httpd
For more information on modifying templates, please see our documentation here.
https://docs.cpanel.net/ea4/apache/custom-templates/
For more information on how to use the diff command, I would recommend the following resource.
https://www.geeksforgeeks.org/diff-command-linux-examples/
Comments
0 comments
Article is closed for comments.