Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 08-05-2008 Installation Manual page 765

Hide thumbs Also See for LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 08-05-2008:
Table of Contents

Advertisement

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
matching ServerName entry of one of the virtual host declarations. If no matching
ServerName is found, the first specified virtual host is used as a default.
The directive NameVirtualHost tells Apache on which IP address and, optionally,
which port to listen for requests by clients containing the domain name in the HTTP
header. This option is configured in the configuration file /etc/apache2/listen
.conf.
The first argument can be a fully qualified domain name, but it is recommended to use
the IP address. The second argument is the port and is optional. By default, port 80 is
used and is configured via the Listen directive.
http://httpd.apache.org/docs/2.2/mod/
for further information about Apache's configuration di-
Section "Virtual Hosts"
The Apache HTTP Server
(page 754)) or
747

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents