
Example 40.3
IP-Based VirtualHost Directives
<VirtualHost 192.168.0.20>
...
</VirtualHost>
<VirtualHost 192.168.0.30>
...
</VirtualHost>
Here,
VirtualHost
directives are only specified for interfaces other than
192.168.0.10
. When a
Listen
directive is also configured for
192.168.0.10
,
a separate IP-based virtual host must be created to answer HTTP requests to that inter-
face—otherwise the directives found in the default server configuration (
/etc/
apache2/default-server.conf
) are applied.
Basic Virtual Host Configuration
At least the following directives should be present in each virtual host configuration in
order to set up a virtual host. See
/etc/apache2/vhosts.d/vhost.template
for more options.
ServerName
The fully qualified domain name under which the host should be addressed.
DocumentRoot
Path to the directory from which Apache should serve files for this host. For secu-
rity reasons, access to the entire file system is forbidden by default, so you must
explicitly unlock this directory within a
Directory
container.
ServerAdmin
E-mail address of the server administrator. This address is, for example, shown on
error pages Apache creates.
ErrorLog
The error log file for this virtual host. Although it is not necessary to create separate
error log files for each virtual host, it is common practice to do so, because it makes
debugging of errors much easier.
/var/log/apache2/
is the default directory
where Apache's log files should be kept.
746
Installation and Administration
Summary of Contents for LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Page 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Page 14: ......
Page 19: ...Part I Deployment...
Page 20: ......
Page 60: ......
Page 128: ......
Page 243: ...Part II Administration...
Page 244: ......
Page 274: ......
Page 312: ......
Page 348: ......
Page 380: ......
Page 381: ...Part III System...
Page 382: ......
Page 438: ......
Page 452: ......
Page 478: ......
Page 486: ......
Page 498: ......
Page 512: ......
Page 558: ......
Page 559: ...Part IV Services...
Page 560: ......
Page 652: ......
Page 670: ......
Page 742: ......
Page 754: ......
Page 796: ......
Page 817: ...Part V Security...
Page 818: ......
Page 858: ......
Page 886: ......
Page 910: ......
Page 911: ...Part VI Troubleshooting...
Page 912: ......
Page 924: ......