Novell LINUX ENTERPRISE SERVER 11 - ADMINISTRATION Administration Manual page 391

Hide thumbs Also See for LINUX ENTERPRISE SERVER 11 - ADMINISTRATION:
Table of Contents

Advertisement

To list all existing virtual hosts, use the command httpd2 -S. This outputs a list
showing the default server and all virtual hosts together with their IP addresses and
listening ports. Furthermore, the list also contains an entry for each virtual host showing
its location in the configuration files.
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.
When using name-based virtual hosts it is recommended to set up a default
configuration that will be used when a domain name does not match a virtual
host configuration. The default virtual host is the one whose configuration is
loaded first. Since the order of the configuration files is determined by filename,
start the filename of the default virtual host configuration with an "_", e.g.
_default_vhost.conf, to make sure it is loaded first.
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.
http://httpd.apache.org/docs/2.2/mod/
for further information about Apache's configuration di-
Section "Virtual Hosts"
The Apache HTTP Server
(page 384)) or
377

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 11

Table of Contents