Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007 Installation Manual page 761

Table of Contents

Advertisement

Virtual Host Configuration
The term virtual host refers to Apache's ability to serve multiple URIs (universal resource
identifiers) from the same physical machine. This means that several domains, such as
www.example.com and www.example.net, are run by a single Web server on one
physical machine.
It is common practice to use virtual hosts to save administrative effort (only a single
Web server needs to be maintained) and hardware expenses (each domain does not re-
quire a dedicated server). Virtual hosts can be name based, IP based, or port based.
Virtual hosts can be configured via YaST (see
by manually editing a configuration file. By default, Apache in SUSE Linux Enterprise
Server is prepared for one configuration file per virtual host in /etc/apache2/
vhosts.d/. All files in this directory with the extension .conf are automatically
included to the configuration. A basic template for a virtual host is provided in this di-
rectory (vhost.template or vhost-ssl.template for a virtual host with SSL
support).
TIP: Always Create a Virtual Host Configuration
It is recommended to always create a virtual host configuration file, even if
your Web server only hosts one domain. In doing so, you not only have the
domain-specific configuration in one file, but you can always fall back to a
working basic configuration by simply moving, deleting, or renaming the confi-
guration file for the virtual host. For the same reason, you should also create
separate configuration files for each virtual host.
The <VirtualHost></VirtualHost> block holds the information that applies
to a particular domain. When Apache receives a client request for a defined virtual host,
it uses the directives enclosed in this section. Almost all directives can be used in a
virtual host context. See
quickreference.html
rectives.
Name-Based Virtual Hosts
With name-based virtual hosts, more than one Web site is served per IP address. Apache
uses the host field in the HTTP header sent by the client to connect the request to a
http://httpd.apache.org/docs/2.2/mod/
for further information about Apache's configuration di-
Section "Virtual Hosts"
The Apache HTTP Server
(page 751)) or
743

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents