OK, this is a quickie on using the /usr/local/apache/conf/userdata /magic/
1. If the directory does not exist, create it:
Code:
shell> mkdir /usr/local/apache/conf/userdata
2. The directory hierarchy is as follows:
Code:
shell> cd /usr/local/apache/conf/userdata
First level of directories are
std and
ssl std means non-SSL settings and ssl means SSL settings. Within both of those directories you would create two directories
1 and
2. These correspond to the Major Apache versions. Thus, one would not create 1.3, 2.2 or 2.0
Within the directories that correspond to the Major Apache version, would be directories for each cPanel user name. Within those directories for each user name would be directories for each domain owned by the account. Thus, if my user name is cpkenneth and I own the domain cpanelkenneth.info and my cPanel server runs Apache 2.2 and I wanted fine-grained control over the vhost that configures that domain, I would drop a conf file in:
Code:
shell> mkdir -p /usr/local/apache/conf/userdata/std/2/cpkenneth/cpanelkenneth.info
shell> cd /usr/local/apache/conf/userdata/std/2/cpkenneth/cpanelkenneth.info
shell> vim custom.conf
shell> /scripts/ensure_vhost_includes --user=cpkenneth
shell> /scripts/restartsrv_httpd
Whereas, if I wanted to customize behavior for all vhosts on that hypothetical server, I would do this:
Code:
shell> mkdir -p /usr/local/apache/conf/userdata/std/2/
shell> cd /usr/local/apache/conf/userdata/std/2/
shell> vim custom.conf
shell> /scripts/ensure_vhost_includes --all-users
shell> /scripts/restartsrv_httpd
The file does not need named custom.conf, as long as it ends in .conf
We are working to simplify some of this, based upon user request.
Since this is a "quickie" there are likely errors/typos.