
Originally Posted by
JoeMurray
I'm using cPanel for the first time, and I'd like to reconfigure how it has been configured to set up virtual hosts. The online documentation I have found is more user level rather than how to set up templates, unfortunately.
Currently, the default action of cPanel on my new server is to put the cgi-bin directory under document root rather than the preferred more secure location of webroot:
/home/domuser/public_html/cgi-bin
rather than
/home/domuser/cgi-bin
To make this change I believe I should modify /var/cpanel/templates/apache2/vhost.default at the following:
[% IF scriptalias == 1 -%]
ScriptAlias /cgi-bin/ [% vhost.documentroot %]/cgi-bin/
[% END -%]
to something like:
[% IF scriptalias == 1 -%]
ScriptAlias /cgi-bin/ [% vhost.webroot %]/cgi-bin/
[% END -%]
or maybe:
[% IF scriptalias == 1 -%]
ScriptAlias /cgi-bin/ [% vhost.homedir %]/cgi-bin/
[% END -%]
Unfortunately, I can't find documentation on what the properties of vhost are, or what ones that I can see already in the file like homedir contain.
Advice on a) how to handle this issue, and b) where to find documentation, would be appreciated. I have another issue where I want to serve multiple domains from the same directory, and I will need to rewrite some templates for that, I believe.