Predefining Virtual Hosts for New Sites

When Panel creates a site, one of the operations it carries out is to create a directory structure for the site and fill the directories with some initial content. These directories are located in the corresponding virtual host directories - /var/www/vhosts/<domain_name>, where domain_name is the name of a corresponding domain. By default, Panel creates similar sets of files and directories inside each virtual host directory. See the section Default Structure of Panel Virtual Host for a complete list of these files and directories.

If you want to change the set of files and directories that are automatically included in new sites, for example, so as to include some useful scripts or change the error pages, you can define a custom virtual host template. Later, you can replace, edit or remove files generated by the template from any site.

In addition, resellers can set separate virtual hosts templates for their customers.

To define a custom virtual host template:

  1. On your local file system, create the required directories: httpdocs, httpsdocs, cgi-bin, anon_ftp, error_docs.
  2. Place the files you need into these directories. Place web pages in httpdocs and httpsdocs directories, scripts in the cgi-bin directory, and custom error messages in the error_docs directory.

    You can use the default files stored in the /var/www/vhosts/skel/0.

  3. Pack the directories and files into an archive in tgz, tar, tar.gz, or zip format.

    Make sure that the directories are in the root of the archive file and not in a subdirectory.

  4. Upload the archive to Panel though the GUI: Server Administration Panel > Tools & Utilities > Virtual Host Template > Browse.

To switch back to the default virtual host template, go to Tools & Utilities > Virtual Host Template and click the Default button.

In this section:

Default Structure of Panel Virtual Host

Please send us your feedback on this help page.