Last modified: 27 Dec 2007
WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the
official Parallels site.
Sometimes you might want to alter H-Sphere so it creates some additional entries
in Virtual Host config files for a particular plan. You might need it to integrate java
hosting, or some 3rd party CGI. For this, you would have to edit the file
vhost.config is the file for virtual host configuration. It has a form of
a template, like any other template used in H-Sphere. You should read
the guide on template customization
and create custom templates directory as well as make a copy of the file
before you start modifing the file.
First of all, choose a paramter to separate one plan from another. To do that,
go to Plans->Manage, and click settings next to the plan.
Set variable, like TOMCAT_SUPPORT 1. After that, open the vhost.config
template, and add:
<if account.plan.values.TOMCAT_SUPPORT == "1">
Within this IF clause, do whatever you got to do for that virtual host config.
This way, only plans with that setting would have this entry.
There are 3 scripts that are used for domain, on domain creation, deletion,
and when some alteration to the config is done. This is how they are called:
On domain creation:
On domain removal:
creates a site configuration file
$1 - id of the site
deleting vhost file
$1 - id of site configuration removed (we don't remove files)
creating vhost directory
$1 - directory inside user directory
$2 - username
$3 - group name
$4 - permission to the directory
$5 - domain
$6 - instant alias
$7 - cpanel login
$8 - control panel url
$9 - SiteStudio url
$10 - SiteStudio class name (you should not care about those,
it is done for the first page the user will see)