Custom Directives Outside of a VirtualHost Tag
I created a copy of vhost.default
at /var/cpanel/templates/apache2
named vhost.local
, found the first line listed below and added the second line below it.
ScriptAlias /cgi-bin/ [% vhost.documentroot %]/cgi-bin/
ScriptAlias /services/ [% vhost.documentroot %]/services/
Create/edit the appropriate file as indicated in the table. For example:
ScriptAlias "/services/" "/full/path/to/services/"
<Directory "/full/path/to/services/">
SetHandler cgi-script
Options ExecCGI
</Directory>
And then restart Apache.
If you wish to change the content of all future virtualhost containers that cPanel & WHM creates for accounts, read the Custom Templates documentation.
Follow the instructions found there.