Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need some custom filters for Apache, so I wrote a mod_perl module MyFilter and put this in /etc/httpd. However, 24 hours later, cpanel seems to remove all 'unkown' directories from /etc/httpd. How do I prevent this from happening?


share|improve this question

closed as off-topic by HopelessN00b Jan 13 '15 at 20:49

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 13 '15 at 20:49

I received the answer from cpanel support;

You could create the directory in /usr/local/"your directory", then create a symlink as follows.

mkdir /usr/local/MyFilter
ln -s /usr/local/MyFilter /usr/local/apache/MyFilter
chmod 755 /usr/local/MyFilter

Then create the hook script /scripts/posteasyapache with a bash command inside it to recreate the above symlink anytime Apache is rebuilt. Then set the posteasyapache script executable "chmod +x /scripts/posteasyapache"

share|improve this answer

Try adding it to /usr/local/apache ?

Also, where did you put the config includes? The proper place is /usr/local/apache/conf/include/ files. For example, in /usr/local/apache/conf/include/pre_main_2.conf

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.