Httpd Virtual Host Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:


=Name-Based Virtual Host Configuration=
=Name-Based Virtual Host Configuration=
For each virtual host you want to serve, create a <tt><VirtualHost></tt> section.
The <tt><VirtualHost></tt> section must contain at minimum a <tt>ServerName</tt> directive to designate what host to serve and a <tt>DocumentRoot</tt> directive to indicate the file system directory that contains the content to server.

Revision as of 04:17, 6 January 2016

Internal

Overview

Virtual hosts can be declared using the <VirtualHost> configuration element. <VirtualHost> encloses a group of directives that apply to only a particular virtual host.

Name-Based Virtual Host Configuration

For each virtual host you want to serve, create a <VirtualHost> section.

The <VirtualHost> section must contain at minimum a ServerName directive to designate what host to serve and a DocumentRoot directive to indicate the file system directory that contains the content to server.