Introduction
The Apache Configuration file--located at /etc/apache2/conf/httpd.conf--should not be edited directly, as cPanel overwrites this file for many reasons.
Things that can trigger this rebuild include but are not limited to:
- Changes made in WHM
- Changes made in cPanel
- Automated routines
Procedure
Instead of editing the file directly, you should instead edit the file in one of four ways.
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 server-wide
You can add directives to specified locations in the Apache configuration through WHM's Include Editor.
Where would I add customizations to Apache?
Finally, you can change the entire structure of the Apache configuration with a build template, which is used when cPanel rebuilds the configuration file.
Comments
0 comments
Article is closed for comments.