Question
Where should I add customizations to Apache?
Answer
Customizations made directly to Apache's configuration file are overwritten when the "rebuildhttpdconf" script executes. We instead recommend the use of Apache includes to prevent your changes from being overwritten. Custom changes should be made via the "WHM / Service Configuration / Apache Configuration / Include Editor" interface.
When Apache's configuration is rebuilt, and the service restarted, the changes made to your includes will be included with Apache without the need to write them directly into the configuration file.
Additional Resources
If you must make a modification inside the context of one or more VirtualHosts, you'll instead need to create Include files.
You can add directives to an individual VirtualHost, which is useful for adjusting per-domain settings, like adding a ProxyPass:
How to use Apache includes to add configuration directives to a specific domain's VirtualHost
You can add directives to all VirtualHosts by a similar method:
How to use Apache includes to add configuration directives to all VirtualHosts sever-wide
Comments
0 comments
Article is closed for comments.