Instead of editing Apache configuration files, the suggested way is to introduce changes to the templates of configuration, based on which the Panel generates its configuration files.
A set of templates from which the Panel default configurations for Web server are created - default templates - is located at
Important: All template customizations must be performed in the
/admin/conf/templates/custom/ directory, and the default templates structure and content must be kept unchanged, since there are no specific tools to undo the changes.
Custom templates override the default ones during the configuration files generation.
To introduce your customizations to Web server configuration, you should copy the templates you need to modify to the
custom/ directory preserving the directories structure, and then modify these copies. You can write a completely new templates from scratch as well, what's important is that they are placed in the
custom/ directory according to the default structure. For detailed information on the template files and directories structure, refer to the Template Files section.
Note: Configuration files for all domains are generated from the configuration templates. It is important to understand that changing a configuration templates is not the way to customize configuration file for a single domain because all domains will be affected.
For example, to modify configuration template for website error pages, which affects error pages configuration for all websites, do the following:
# mkdir -p /usr/local/psa/admin/conf/templates/custom/domain/service/
# cp /usr/local/psa/admin/conf/templates/default/domain/service/errordocs.php /usr/local/psa/admin/conf/templates/custom/domain/service/errordocs.php
To remove customizations and have the default configuration generated, it is enough to just delete files of custom templates.
To manually generate Web server configuration, call the
/admin/bin/httpdmng utility with one of the following arguments:
Generates server-wide configuration files:
Generates files for the website with specified domain name:
Generates all configuration files.
Aside from manually running the utility, configuration files are generated by the Panel automatically upon a variety of events. For example, in case a website hosting settings are changed, say, PHP got enabled, configuration for this website is generated anew.
To sum it up, changing web server configuration implies the following:
custom/preserving the directory structure.
# php -l <file-name>
# httpdmng <command>