configuration file to select which IP address (or virtual host)
that daemon services. e.g.</p>
-<div class="example"><pre>
+ <div class="example"><p><code>
Listen www.smallco.com:80
-</pre></div>
+ </code></p></div>
<p>It is recommended that you use an IP address instead of a
hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
configuration directives to different values for each virtual
host. e.g.</p>
-<div class="example"><pre>
- <VirtualHost www.smallco.com>
- ServerAdmin webmaster@mail.smallco.com
- DocumentRoot /groups/smallco/www
- ServerName www.smallco.com
- ErrorLog /groups/smallco/logs/error_log
- TransferLog /groups/smallco/logs/access_log
+ <div class="example"><p><code>
+ <VirtualHost www.smallco.com><br />
+ ServerAdmin webmaster@mail.smallco.com<br />
+ DocumentRoot /groups/smallco/www<br />
+ ServerName www.smallco.com<br />
+ ErrorLog /groups/smallco/logs/error_log<br />
+ TransferLog /groups/smallco/logs/access_log<br />
+ </VirtualHost><br />
+ <br />
+ <VirtualHost www.baygroup.org><br />
+ ServerAdmin webmaster@mail.baygroup.org<br />
+ DocumentRoot /groups/baygroup/www<br />
+ ServerName www.baygroup.org<br />
+ ErrorLog /groups/baygroup/logs/error_log<br />
+ TransferLog /groups/baygroup/logs/access_log<br />
</VirtualHost>
-
- <VirtualHost www.baygroup.org>
- ServerAdmin webmaster@mail.baygroup.org
- DocumentRoot /groups/baygroup/www
- ServerName www.baygroup.org
- ErrorLog /groups/baygroup/logs/error_log
- TransferLog /groups/baygroup/logs/access_log
- </VirtualHost>
-</pre></div>
+ </code></p></div>
<p>It is recommended that you use an IP address instead of a
hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
configuration file to select which IP address (or virtual host)
that daemon services. e.g.</p>
-<example>
-<pre>
+ <example>
Listen www.smallco.com:80
-</pre>
-</example>
+ </example>
<p>It is recommended that you use an IP address instead of a
hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
configuration directives to different values for each virtual
host. e.g.</p>
-<example>
-<pre>
- <VirtualHost www.smallco.com>
- ServerAdmin webmaster@mail.smallco.com
- DocumentRoot /groups/smallco/www
- ServerName www.smallco.com
- ErrorLog /groups/smallco/logs/error_log
- TransferLog /groups/smallco/logs/access_log
+ <example>
+ <VirtualHost www.smallco.com><br />
+ ServerAdmin webmaster@mail.smallco.com<br />
+ DocumentRoot /groups/smallco/www<br />
+ ServerName www.smallco.com<br />
+ ErrorLog /groups/smallco/logs/error_log<br />
+ TransferLog /groups/smallco/logs/access_log<br />
+ </VirtualHost><br />
+ <br />
+ <VirtualHost www.baygroup.org><br />
+ ServerAdmin webmaster@mail.baygroup.org<br />
+ DocumentRoot /groups/baygroup/www<br />
+ ServerName www.baygroup.org<br />
+ ErrorLog /groups/baygroup/logs/error_log<br />
+ TransferLog /groups/baygroup/logs/access_log<br />
</VirtualHost>
-
- <VirtualHost www.baygroup.org>
- ServerAdmin webmaster@mail.baygroup.org
- DocumentRoot /groups/baygroup/www
- ServerName www.baygroup.org
- ErrorLog /groups/baygroup/logs/error_log
- TransferLog /groups/baygroup/logs/access_log
- </VirtualHost>
-</pre>
-</example>
+ </example>
<p>It is recommended that you use an IP address instead of a
hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
<code>www.otherdomain.tld</code>, which points at the same IP address.
Then you simply add the following to <code>httpd.conf</code>:</p>
- <div class="example"><pre>
- NameVirtualHost *
-
- <VirtualHost *>
- ServerName www.domain.tld
- DocumentRoot /www/domain
- </VirtualHost>
-
- <VirtualHost *>
- ServerName www.otherdomain.tld
- DocumentRoot /www/otherdomain
- </VirtualHost>
-</pre></div>
+ <div class="example"><p><code>
+ NameVirtualHost *<br />
+ <br />
+ <VirtualHost *><br />
+ ServerName www.domain.tld<br />
+ DocumentRoot /www/domain<br />
+ </VirtualHost><br />
+ <br />
+ <VirtualHost *><br />
+ ServerName www.otherdomain.tld<br />
+ DocumentRoot /www/otherdomain<br />
+ </VirtualHost><br />
+ </code></p></div>
<p>You can alternatively specify an explicit IP address in place of
the * in both the <code>NameVirtualHost</code> and
Then you simply add the following to <code>httpd.conf</code>:</p>
<example>
-<pre>
- NameVirtualHost *
-
- <VirtualHost *>
- ServerName www.domain.tld
- DocumentRoot /www/domain
- </VirtualHost>
-
- <VirtualHost *>
- ServerName www.otherdomain.tld
- DocumentRoot /www/otherdomain
- </VirtualHost>
-</pre>
+ NameVirtualHost *<br />
+ <br />
+ <VirtualHost *><br />
+ ServerName www.domain.tld<br />
+ DocumentRoot /www/domain<br />
+ </VirtualHost><br />
+ <br />
+ <VirtualHost *><br />
+ ServerName www.otherdomain.tld<br />
+ DocumentRoot /www/otherdomain<br />
+ </VirtualHost><br />
</example>
<p>You can alternatively specify an explicit IP address in place of