Many VPS servers have a control panel in place to make it 'easier' to manage and configure the system. They can be really useful for handling multiple accounts (for email, FTP), multiple domains and so on. However, they tend to completely manage the web server configuration for you as well and that can make doing certain customizations really, really hard work!
I've been working on a server managed by cPanel lately and needed to hook in some Apache rewrite rules and proxy settings to integrate Tomcat and Railo into several of the sites. cPanel applies a very heavy management layer to Apache so it can be hard to figure out what you can safely change - and where to add your own custom directives. Here's a very useful page from the cPanel documentation:
Adding Custom Directives to httpd.conf
You can add directives at various levels (although the examples are not 100% accurate so be careful to verify what it is actually telling you!). Note that the /usr/local/apache/conf/userdata folder structure does not exist by default so you have to create all your own entries in there.
You will find also yourself relying heavily on some commands to verify that your new custom directives are being picked up and also to apply them:
/scripts/verify_vhost_includes --show-test-output
/scripts/verify_vhost_includes --commit
/scripts/ensure_vhost_includes --all-users
There are no comments for this entry.


