As the term IP-based indicates, the server must have a different IP address for each IP-based virtual host. This can be achieved by the machine having several physical network connections, or by use of virtual interfaces which are supported by most modern operating systems (see system documentation for details, these are frequently called "ip aliases", and the "ifconfig" command is most commonly used to set them up).
There are two ways of configuring apache to support multiple
hosts. Either by running a separate
Use multiple daemons when:
Use a single daemon when:
Create a separate
It is recommended that you use an IP address instead of a hostname (see DNS caveats).
For this case, a single
It is recommended that you use an IP address instead of a hostname (see DNS caveats).
Almost any configuration directive can be put in the VirtualHost directive, with the exception of directives that control process creation and a few other directives. To find out if a directive can be used in the VirtualHost directive, check the Context using the directive index.
SECURITY: When specifying where to write log files, be aware of some security risks which are present if anyone other than the user that starts Apache has write access to the directory where they are written. See the security tips document for details.