Loading docs/manual/mod/core.xml +4 −3 Original line number Diff line number Diff line Loading @@ -3944,7 +3944,8 @@ to name-virtual hosts</description> >ServerAlias</directive> is used, with no different precedence for wildcards (nor for ServerName vs. ServerAlias). </p> <p>The complete list of names in the <directive>VirtualHost</directive> <p>The complete list of names in the <directive type="section" module="core" >VirtualHost</directive> directive are treated just like a (non wildcard) <directive>ServerAlias</directive>.</p> Loading @@ -3967,13 +3968,13 @@ itself</description> </p> <p><directive>ServerName</directive> is used (possibly in conjunction with <directive>ServerAlias</directive>) to uniquely in conjunction with <directive module="core">ServerAlias</directive>) to uniquely identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p> <p>Additionally, this is used when creating self-referential redirection URLs when <directive>UseCanonicalName</directive> is set to a non-default <directive module="core">UseCanonicalName</directive> is set to a non-default value.</p> <p>For example, if the name of the Loading docs/manual/vhosts/examples.xml +23 −24 Original line number Diff line number Diff line Loading @@ -38,10 +38,9 @@ <section id="purename"><title>Running several name-based web sites on a single IP address.</title> <p>Your server has a single IP address, and multiple aliases (CNAMES) point to this machine in DNS. You want to run a web server for <code>www.example.com</code> and <code>www.example.org</code> on this machine.</p> <p>Your server has multiple hostnames that resolve to a single address, and you want to respond differently for <code>www.example.com</code> and <code>www.example.org</code>.</p> <note><title>Note</title><p>Creating virtual host configurations on your Apache server does not magically Loading Loading @@ -77,15 +76,21 @@ Listen 80 in the configuration file, it has the highest priority and can be seen as the <cite>default</cite> or <cite>primary</cite> server. That means that if a request is received that does not match one of the specified <code>ServerName</code> directives, it will be served by this first <code>VirtualHost</code>.</p> <directive module="core">ServerName</directive> directives, it will be served by this first <directive type="section" module="core">VirtualHost</directive>.</p> <p>The above configuration is what you will want to use in almost all name-based virtual hosting situations. The only thing that this configuration will not work for, in fact, is when you are serving different content based on differing IP addresses or ports.</p> <note> <title>Note</title> <p>You can, if you wish, replace <code>*</code> with the actual IP address of the system, when you don't care to discriminate based on the IP address or port.</p> <p>You may replace <code>*</code> with a specific IP address on the system. Such virtual hosts will only be used for HTTP requests received on connection to the specified IP address.</p> <p>However, it is additionally useful to use <code>*</code> on systems where the IP address is not predictable - for Loading @@ -95,12 +100,6 @@ Listen 80 would work without changes whenever your IP address changes.</p> </note> <p>The above configuration is what you will want to use in almost all name-based virtual hosting situations. The only thing that this configuration will not work for, in fact, is when you are serving different content based on differing IP addresses or ports.</p> </section> <section id="twoips"><title>Name-based hosts on more than one Loading Loading @@ -158,8 +157,8 @@ DocumentRoot "/www/mainserver" (<code>192.168.1.1</code>).</p> <p>The server can be made to respond to internal and external requests with the same content, with just one <code>VirtualHost</code> section.</p> with the same content, with just one <directive type="section" module="core" >VirtualHost</directive> section.</p> <highlight language="config"> <VirtualHost 192.168.1.1 172.20.30.40> Loading @@ -170,7 +169,7 @@ DocumentRoot "/www/mainserver" </highlight> <p>Now requests from both networks will be served from the same <code>VirtualHost</code>.</p> <directive type="section" module="core">VirtualHost</directive>.</p> <note> <title>Note:</title><p>On the internal Loading Loading
docs/manual/mod/core.xml +4 −3 Original line number Diff line number Diff line Loading @@ -3944,7 +3944,8 @@ to name-virtual hosts</description> >ServerAlias</directive> is used, with no different precedence for wildcards (nor for ServerName vs. ServerAlias). </p> <p>The complete list of names in the <directive>VirtualHost</directive> <p>The complete list of names in the <directive type="section" module="core" >VirtualHost</directive> directive are treated just like a (non wildcard) <directive>ServerAlias</directive>.</p> Loading @@ -3967,13 +3968,13 @@ itself</description> </p> <p><directive>ServerName</directive> is used (possibly in conjunction with <directive>ServerAlias</directive>) to uniquely in conjunction with <directive module="core">ServerAlias</directive>) to uniquely identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p> <p>Additionally, this is used when creating self-referential redirection URLs when <directive>UseCanonicalName</directive> is set to a non-default <directive module="core">UseCanonicalName</directive> is set to a non-default value.</p> <p>For example, if the name of the Loading
docs/manual/vhosts/examples.xml +23 −24 Original line number Diff line number Diff line Loading @@ -38,10 +38,9 @@ <section id="purename"><title>Running several name-based web sites on a single IP address.</title> <p>Your server has a single IP address, and multiple aliases (CNAMES) point to this machine in DNS. You want to run a web server for <code>www.example.com</code> and <code>www.example.org</code> on this machine.</p> <p>Your server has multiple hostnames that resolve to a single address, and you want to respond differently for <code>www.example.com</code> and <code>www.example.org</code>.</p> <note><title>Note</title><p>Creating virtual host configurations on your Apache server does not magically Loading Loading @@ -77,15 +76,21 @@ Listen 80 in the configuration file, it has the highest priority and can be seen as the <cite>default</cite> or <cite>primary</cite> server. That means that if a request is received that does not match one of the specified <code>ServerName</code> directives, it will be served by this first <code>VirtualHost</code>.</p> <directive module="core">ServerName</directive> directives, it will be served by this first <directive type="section" module="core">VirtualHost</directive>.</p> <p>The above configuration is what you will want to use in almost all name-based virtual hosting situations. The only thing that this configuration will not work for, in fact, is when you are serving different content based on differing IP addresses or ports.</p> <note> <title>Note</title> <p>You can, if you wish, replace <code>*</code> with the actual IP address of the system, when you don't care to discriminate based on the IP address or port.</p> <p>You may replace <code>*</code> with a specific IP address on the system. Such virtual hosts will only be used for HTTP requests received on connection to the specified IP address.</p> <p>However, it is additionally useful to use <code>*</code> on systems where the IP address is not predictable - for Loading @@ -95,12 +100,6 @@ Listen 80 would work without changes whenever your IP address changes.</p> </note> <p>The above configuration is what you will want to use in almost all name-based virtual hosting situations. The only thing that this configuration will not work for, in fact, is when you are serving different content based on differing IP addresses or ports.</p> </section> <section id="twoips"><title>Name-based hosts on more than one Loading Loading @@ -158,8 +157,8 @@ DocumentRoot "/www/mainserver" (<code>192.168.1.1</code>).</p> <p>The server can be made to respond to internal and external requests with the same content, with just one <code>VirtualHost</code> section.</p> with the same content, with just one <directive type="section" module="core" >VirtualHost</directive> section.</p> <highlight language="config"> <VirtualHost 192.168.1.1 172.20.30.40> Loading @@ -170,7 +169,7 @@ DocumentRoot "/www/mainserver" </highlight> <p>Now requests from both networks will be served from the same <code>VirtualHost</code>.</p> <directive type="section" module="core">VirtualHost</directive>.</p> <note> <title>Note:</title><p>On the internal Loading