Most commonly, customizing the Apache configuration of individual apps (a.k.a. virtual hosts or vhosts) is what you're trying to do. In a few cases, you may be looking to make global customizations.
The easiest way to customize an app's Apache configuration is to add new files in the directory:
/etc/apache-sp/vhosts.d/APPNAME.d
Note that Apache loads configuration files from the above directory in alphabetical order.
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
If you must modify either of these files, you must first rename the file so that ServerPilot won't overwrite your changes.
If you edit APPNAME.conf
, rename it to APPNAME.custom.conf
.
If you edit main.conf
, rename it to main.custom.conf
.
If you need to customize the global Apache configuration, you can 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, restart Apache by running the following command as root:
sudo service apache-sp restart