Configure Apache 2 Virtual Hosts. For more information on Droid, please see droidphp.com.
The steps involved are:-
- Write a virtual host configuration file for each defined website, to each of the hosts.
- Optionally create the document root directory of each website on each of the hosts.
- Optionally write a placeholder index page to the document root of each website on each of the hosts.
- Enable each virtual host on each of the hosts.
- Instruct Apache to reload its configuration on each of the hosts.
- The platform is Debian-based.
- Each of the machines is to host the same set of Apache virtual hosts.
- One virtual host configuration template is used as the basis for all of the virtual hosts.
- The variability of the virtual host configuration template is limited to the
following directives:-
- The virtual host socket on which to listen
ServerName
DocumentRoot
- A list of zero or more
SetEnv
directives
A list of virtual host configurations as module_apache_vhost_items
, each with
the following elements:-
name
: A name for the configuration; used in the config and log file names.socket
: A socket string, suitable for Apache's<VirtualHost>
directive.servername
: A value for theServerName
directive.docroot
: A value for theDocumentRoot
and the<Directory>
directory-path.
Members of module_apache_vhost_items
may also contain the following
elements:-
env
: A list of strings suitable as arguments to theSetEnv
directive.placeholder
: set to true if you want to create a placeholder index.html file