httpd.conf. WHM features an editor for these include files. This interface can be accessed at Main::Service Configuration::Apache Configuration::Include Editor.
httpd.conf.
Virtually any Apache directive can be added through the Include Editor. However, you should make sure that your changes are syntactically valid.
.htaccess.
Some events in a cPanel environment will trigger a syntax check of a .htaccess file. During the check, Apache will not know about any modules that are loaded at runtime. Reference to configuration directives provided by these modules will produce syntax errors during this check. To prevent this, you must wrap such directives in an <IfModule></IfModule> block.
Example:
<IfModule mod_suphp.c>
suPHP_ConfigPath /etc
</IfModule>
httpd.conf, most changes outside of a VirtualHost directive can be preserved easily using the config distiller tool: httpd.conf.
httpd.conf file. The information contained within a custom template file is processed by the Template Toolkit, http://template-toolkit.org, and will automatically be updated with information from the datastores used by the configuration system.
Apache 1 templates should be placed at /var/cpanel/templates/apache1/main.local. You should copy /var/cpanel/templates/apache1/main.default to /var/cpanel/templates/apache1/main.local.
Apache 2 templates should be placed at /var/cpanel/templates/apache2/main.local. You should copy /var/cpanel/templates/apache2/main.default to /var/cpanel/templates/apache2.main.local.
However, it is important to remember that, once you create a custom template, the EasyApache system will no longer preserve changes made outside of the VirtualHost directives in httpd.conf. The Apache config distiller only updates the main.default template.
For more information about custom templates, please visit our documentation here.
Copyright © cPanel 2000-2010.