Customize the Apache configuration
Global vs. app customizations
When the customizations you’re making are for a specific app, it’s best to perform app customizations rather than global customizations.
App customizations
After making configuration changes, restart Apache with the following command:
sudo service apache-sp restart
Adding app configurations
The easiest way to customize an app’s Apache configuration is to add new
files in the app’s Apache configuration directory.
Replace APPNAME
with the name of the app.
/etc/apache-sp/vhosts.d/APPNAME.d
Apache loads configuration files from the above directory in alphabetical order.
Changing default app configurations
Every app starts with the following Apache files created by ServerPilot:
/etc/apache-sp/vhosts.d/APPNAME.conf/etc/apache-sp/vhosts.d/APPNAME.d/main.conf
ServerPilot will overwrite your changes to these files if you do not rename the files as follows:
- To customize
APPNAME.conf
, rename the file toAPPNAME.custom.conf
. - To customize
main.conf
, rename the file tomain.custom.conf
.
Global customizations
If you need to customize the global Apache configuration, add configuration files in the directory:
/etc/apache-sp/conf.d
Any configurations added in the above directory will be loaded in the global Apache context.
After making any changes, you must restart Apache.
sudo service apache-sp restart