Symptoms
When trying to modify the Apache configuration by rebuilding it, adding or removing domains or subdomains, you are faced with the following error:
There was a problem creating the (sub-)domain:
(XID $$$$$$) The system failed to lock the append-only (+a) file “/etc/apache2/conf/httpd.conf” (as EUID: 0, EGID: 0) because of the following error: Operation not permitted
Description
If the Apache configuration has been given the append-only attribute, it is unable to be properly modified by cPanel. This will cause issues with cPanel being able to change or rebuild the configuration.
Workaround
Remove the append-only attribute on the Apache configuration file using the chattr command:
chattr -a /etc/apache2/conf/httpd.conf