httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1334000 - in /httpd/httpd/branches/2.4.x/docs/manual/vhosts: examples.xml fd-limits.xml ip-based.xml mass.xml name-based.xml
Date Fri, 04 May 2012 14:44:34 GMT
Author: humbedooh
Date: Fri May  4 14:44:34 2012
New Revision: 1334000

URL: http://svn.apache.org/viewvc?rev=1334000&view=rev
Log:
Backporting syntax highlighting for vhosts/

Modified:
    httpd/httpd/branches/2.4.x/docs/manual/vhosts/examples.xml
    httpd/httpd/branches/2.4.x/docs/manual/vhosts/fd-limits.xml
    httpd/httpd/branches/2.4.x/docs/manual/vhosts/ip-based.xml
    httpd/httpd/branches/2.4.x/docs/manual/vhosts/mass.xml
    httpd/httpd/branches/2.4.x/docs/manual/vhosts/name-based.xml

Modified: httpd/httpd/branches/2.4.x/docs/manual/vhosts/examples.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/vhosts/examples.xml?rev=1334000&r1=1333999&r2=1334000&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/vhosts/examples.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/vhosts/examples.xml Fri May  4 14:44:34 2012
@@ -53,33 +53,23 @@
           <code>hosts</code> entries.</p>
     </note>
 
-    <example>
-    <title>Server configuration</title>
-
-    # Ensure that Apache listens on port 80<br />
-    Listen 80<br />
-    <br />
-    <br />
-    &lt;VirtualHost *:80&gt;<br />
-    <indent>
-      DocumentRoot /www/example1<br />
-      ServerName www.example.com<br />
-      <br />
-      # Other directives here<br />
-      <br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost *:80&gt;<br />
-    <indent>
-      DocumentRoot /www/example2<br />
-      ServerName www.example.org<br />
-      <br />
-      # Other directives here<br />
-      <br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+# Ensure that Apache listens on port 80
+Listen 80
+&lt;VirtualHost *:80&gt;
+    DocumentRoot /www/example1
+    ServerName www.example.com
+  
+    # Other directives here
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost *:80&gt;
+    DocumentRoot /www/example2
+    ServerName www.example.org
+
+    # Other directives here
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>The asterisks match all addresses, so the main server serves no
     requests. Due to the fact that the virtual host with
@@ -126,35 +116,27 @@
     will serve the "main" server, <code>server.example.com</code> and on the
     other (<code>172.20.30.50</code>), we will serve two or more virtual hosts.</p>
 
-    <example>
-    <title>Server configuration</title>
+    <highlight language="config">
+Listen 80
 
-    Listen 80<br />
-    <br />
-    # This is the "main" server running on 172.20.30.40<br />
-    ServerName server.example.com<br />
-    DocumentRoot /www/mainserver<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50&gt;<br />
-    <indent>
-        DocumentRoot /www/example1<br />
-        ServerName www.example.com<br />
-        <br />
-        # Other directives here ...<br />
-        <br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50&gt;<br />
-    <indent>
-        DocumentRoot /www/example2<br />
-        ServerName www.example.org<br />
-        <br />
-        # Other directives here ...<br />
-        <br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+# This is the "main" server running on 172.20.30.40
+ServerName server.example.com
+DocumentRoot /www/mainserver
+
+&lt;VirtualHost 172.20.30.50&gt;
+    DocumentRoot /www/example1
+    ServerName www.example.com
+    
+    # Other directives here ...
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.50&gt;
+    DocumentRoot /www/example2
+    ServerName www.example.org
+    
+    # Other directives here ...
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>Any request to an address other than <code>172.20.30.50</code> will
be
     served from the main server. A request to <code>172.20.30.50</code> with
an
@@ -179,18 +161,13 @@
     with the same content, with just one <code>VirtualHost</code>
     section.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    <br />
-    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/server1<br />
-        ServerName server.example.com<br />
-        ServerAlias server<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
+    DocumentRoot /www/server1
+    ServerName server.example.com
+    ServerAlias server
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>Now requests from both networks will be served from the same
     <code>VirtualHost</code>.</p>
@@ -216,40 +193,30 @@
     takes place after the best matching IP address and port combination
     is determined.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    Listen 80<br />
-    Listen 8080<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:80&gt;<br />
-    <indent>
-        ServerName www.example.com<br />
-        DocumentRoot /www/domain-80<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
-    <indent>
-        ServerName www.example.com<br />
-        DocumentRoot /www/domain-8080<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:80&gt;<br />
-    <indent>
-        ServerName www.example.org<br />
-        DocumentRoot /www/otherdomain-80<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
-    <indent>
-        ServerName www.example.org<br />
-        DocumentRoot /www/otherdomain-8080<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+Listen 80
+Listen 8080
+
+&lt;VirtualHost 172.20.30.40:80&gt;
+    ServerName www.example.com
+    DocumentRoot /www/domain-80
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40:8080&gt;
+    ServerName www.example.com
+    DocumentRoot /www/domain-8080
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40:80&gt;
+    ServerName www.example.org
+    DocumentRoot /www/otherdomain-80
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40:8080&gt;
+    ServerName www.example.org
+    DocumentRoot /www/otherdomain-8080
+&lt;/VirtualHost&gt;
+    </highlight>
 
   </section>
 
@@ -260,25 +227,19 @@
     <code>www.example.com</code> and <code>www.example.org</code>
     respectively.</p>
 
-    <example>
-    <title>Server configuration</title>
+    <highlight language="config">
+Listen 80
 
-    Listen 80<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/example1<br />
-        ServerName www.example.com<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50&gt;<br />
-    <indent>
-        DocumentRoot /www/example2<br />
-        ServerName www.example.org<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/example1
+    ServerName www.example.com
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.50&gt;
+    DocumentRoot /www/example2
+    ServerName www.example.org
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>Requests for any address not specified in one of the
     <code>&lt;VirtualHost&gt;</code> directives (such as
@@ -296,42 +257,32 @@
     respectively. In each case, we want to run hosts on ports 80 and
     8080.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    Listen 172.20.30.40:80<br />
-    Listen 172.20.30.40:8080<br />
-    Listen 172.20.30.50:80<br />
-    Listen 172.20.30.50:8080<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:80&gt;<br />
-    <indent>
-        DocumentRoot /www/example1-80<br />
-        ServerName www.example.com<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
-    <indent>
-        DocumentRoot /www/example1-8080<br />
-        ServerName www.example.com<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50:80&gt;<br />
-    <indent>
-        DocumentRoot /www/example2-80<br />
-        ServerName www.example.org<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
-    <indent>
-        DocumentRoot /www/example2-8080<br />
-        ServerName www.example.org<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+Listen 172.20.30.40:80
+Listen 172.20.30.40:8080
+Listen 172.20.30.50:80
+Listen 172.20.30.50:8080
+
+&lt;VirtualHost 172.20.30.40:80&gt;
+    DocumentRoot /www/example1-80
+    ServerName www.example.com
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40:8080&gt;
+    DocumentRoot /www/example1-8080
+    ServerName www.example.com
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.50:80&gt;
+    DocumentRoot /www/example2-80
+    ServerName www.example.org
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.50:8080&gt;
+    DocumentRoot /www/example2-8080
+    ServerName www.example.org
+&lt;/VirtualHost&gt;
+    </highlight>
 
   </section>
 
@@ -341,46 +292,34 @@
     <p>Any address mentioned in the argument to a virtualhost that never
     appears in another virtual host is a strictly IP-based virtual host.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    Listen 80<br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/example1<br />
-        ServerName www.example.com<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/example2<br />
-        ServerName www.example.org<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/example3<br />
-        ServerName www.example.net<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    # IP-based<br />
-    &lt;VirtualHost 172.20.30.50&gt;<br />
-    <indent>
-        DocumentRoot /www/example4<br />
-        ServerName www.example.edu<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.60&gt;<br />
-    <indent>
-        DocumentRoot /www/example5<br />
-        ServerName www.example.gov<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+Listen 80
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/example1
+    ServerName www.example.com
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/example2
+    ServerName www.example.org
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/example3
+    ServerName www.example.net
+&lt;/VirtualHost&gt;
+
+# IP-based
+&lt;VirtualHost 172.20.30.50&gt;
+    DocumentRoot /www/example4
+    ServerName www.example.edu
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.60&gt;
+    DocumentRoot /www/example5
+    ServerName www.example.gov
+&lt;/VirtualHost&gt;
+    </highlight>
 
   </section>
 
@@ -395,14 +334,14 @@
     used so that the desired hostname is passed through, in case we are
     proxying multiple hostnames to a single machine.</p>
 
-    <example>
-    &lt;VirtualHost *:*&gt;<br />
-        ProxyPreserveHost On<br />
-        ProxyPass / http://192.168.111.2/<br />
-        ProxyPassReverse / http://192.168.111.2/<br />
-        ServerName hostname.example.com<br />
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost *:*&gt;
+    ProxyPreserveHost On
+    ProxyPass / http://192.168.111.2/
+    ProxyPassReverse / http://192.168.111.2/
+    ServerName hostname.example.com
+&lt;/VirtualHost&gt;
+    </highlight>
 
     </section>
 
@@ -416,15 +355,11 @@
     port, <em>i.e.</em>, an address/port combination that is not used for
     any other virtual host.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    &lt;VirtualHost _default_:*&gt;<br />
-    <indent>
-        DocumentRoot /www/default<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost _default_:*&gt;
+    DocumentRoot /www/default
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>Using such a default vhost with a wildcard port effectively prevents
     any request going to the main server.</p>
@@ -446,23 +381,17 @@
     <p>Same as setup 1, but the server listens on several ports and we want
     to use a second <code>_default_</code> vhost for port 80.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    &lt;VirtualHost _default_:80&gt;<br />
-    <indent>
-        DocumentRoot /www/default80<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost _default_:*&gt;<br />
-    <indent>
-        DocumentRoot /www/default<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost _default_:80&gt;
+    DocumentRoot /www/default80
+    # ...
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost _default_:*&gt;
+    DocumentRoot /www/default
+    # ...
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>The default vhost for port 80 (which <em>must</em> appear before
any
     default vhost with a wildcard port) catches all requests that were sent
@@ -476,14 +405,12 @@
     <p>We want to have a default vhost for port 80, but no other default
     vhosts.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    &lt;VirtualHost _default_:80&gt;<br />
-    DocumentRoot /www/default<br />
-    ...<br />
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost _default_:80&gt;
+DocumentRoot /www/default
+...
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>A request to an unspecified address on port 80 is served from the
     default vhost. Any other request to an unspecified address and port is
@@ -511,30 +438,24 @@
     (<code>172.20.30.50</code>) to the <code>VirtualHost</code>
     directive.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    Listen 80<br />
-    ServerName www.example.com<br />
-    DocumentRoot /www/example1<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
-    <indent>
-        DocumentRoot /www/example2<br />
-        ServerName www.example.org<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/example3<br />
-        ServerName www.example.net<br />
-        ServerAlias *.example.net<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+Listen 80
+ServerName www.example.com
+DocumentRoot /www/example1
+
+&lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
+    DocumentRoot /www/example2
+    ServerName www.example.org
+    # ...
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/example3
+    ServerName www.example.net
+    ServerAlias *.example.net
+    # ...
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>The vhost can now be accessed through the new address (as an
     IP-based vhost) and through the old address (as a name-based
@@ -554,41 +475,33 @@
     containing links with an URL prefix to the name-based virtual
     hosts.</p>
 
-    <example>
-    <title>Server configuration</title>
-
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        # primary vhost<br />
-        DocumentRoot /www/subdomain<br />
-        RewriteEngine On<br />
-        RewriteRule . /www/subdomain/index.html<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    DocumentRoot /www/subdomain/sub1<br />
-    <indent>
-        ServerName www.sub1.domain.tld<br />
-        ServerPath /sub1/<br />
-        RewriteEngine On<br />
-        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.40&gt;<br />
-    <indent>
-        DocumentRoot /www/subdomain/sub2<br />
-        ServerName www.sub2.domain.tld<br />
-        ServerPath /sub2/<br />
-        RewriteEngine On<br />
-        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
-        # ...<br />
-    </indent>
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost 172.20.30.40&gt;
+    # primary vhost
+    DocumentRoot /www/subdomain
+    RewriteEngine On
+    RewriteRule . /www/subdomain/index.html
+    # ...
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40&gt;
+DocumentRoot /www/subdomain/sub1
+    ServerName www.sub1.domain.tld
+    ServerPath /sub1/
+    RewriteEngine On
+    RewriteRule ^(/sub1/.*) /www/subdomain$1
+    # ...
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.40&gt;
+    DocumentRoot /www/subdomain/sub2
+    ServerName www.sub2.domain.tld
+    ServerPath /sub2/
+    RewriteEngine On
+    RewriteRule ^(/sub2/.*) /www/subdomain$1
+    # ...
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>Due to the <directive module="core">ServerPath</directive>
     directive a request to the URL

Modified: httpd/httpd/branches/2.4.x/docs/manual/vhosts/fd-limits.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/vhosts/fd-limits.xml?rev=1334000&r1=1333999&r2=1334000&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/vhosts/fd-limits.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/vhosts/fd-limits.xml Fri May  4 14:44:34 2012
@@ -91,10 +91,10 @@ LogFormat</directive>
 directive, and the <code>%v</code> variable. Add this to the beginning
 of your log format string:</p>
 
-<example>
-LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
+<highlight language="config">
+LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
 CustomLog logs/multiple_vhost_log vhost
-</example>
+</highlight>
 
 <p>This will create a log file in the common log format, but with the
 canonical virtual host (whatever appears in the

Modified: httpd/httpd/branches/2.4.x/docs/manual/vhosts/ip-based.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/vhosts/ip-based.xml?rev=1334000&r1=1333999&r2=1334000&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/vhosts/ip-based.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/vhosts/ip-based.xml Fri May  4 14:44:34 2012
@@ -108,9 +108,9 @@ Virtual Hosts</a> to help you decide.  <
     configuration file to select which IP address (or virtual host)
     that daemon services. e.g.</p>
 
-    <example>
+    <highlight language="config">
     Listen 192.0.2.100:80
-    </example>
+    </highlight>
 
     <p>It is recommended that you use an IP address instead of a
     hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
@@ -133,23 +133,23 @@ Virtual Hosts</a> to help you decide.  <
     configuration directives to different values for each virtual
     host. e.g.</p>
 
-    <example>
-    &lt;VirtualHost 172.20.30.40:80&gt;<br />
-    ServerAdmin webmaster@www1.example.com<br />
-    DocumentRoot /www/vhosts/www1<br />
-    ServerName www1.example.com<br />
-    ErrorLog /www/logs/www1/error_log<br />
-    CustomLog /www/logs/www1/access_log combined<br />
-    &lt;/VirtualHost&gt;<br />
-    <br />
-    &lt;VirtualHost 172.20.30.50:80&gt;<br />
-    ServerAdmin webmaster@www2.example.org<br />
-    DocumentRoot /www/vhosts/www2<br />
-    ServerName www2.example.org<br />
-    ErrorLog /www/logs/www2/error_log<br />
-    CustomLog /www/logs/www2/access_log combined<br />
-    &lt;/VirtualHost&gt;
-    </example>
+    <highlight language="config">
+&lt;VirtualHost 172.20.30.40:80&gt;
+    ServerAdmin webmaster@www1.example.com
+    DocumentRoot /www/vhosts/www1
+    ServerName www1.example.com
+    ErrorLog /www/logs/www1/error_log
+    CustomLog /www/logs/www1/access_log combined
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 172.20.30.50:80&gt;
+    ServerAdmin webmaster@www2.example.org
+    DocumentRoot /www/vhosts/www2
+    ServerName www2.example.org
+    ErrorLog /www/logs/www2/error_log
+    CustomLog /www/logs/www2/access_log combined
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>It is recommended that you use an IP address instead of a
     hostname in the &lt;VirtualHost&gt; directive

Modified: httpd/httpd/branches/2.4.x/docs/manual/vhosts/mass.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/vhosts/mass.xml?rev=1334000&r1=1333999&r2=1334000&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/vhosts/mass.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/vhosts/mass.xml Fri May  4 14:44:34 2012
@@ -41,8 +41,7 @@
     <code>&lt;VirtualHost&gt;</code> sections that are
     substantially the same, for example:</p>
 
-<example>
-<pre>
+<highlight language="config">
 &lt;VirtualHost 111.22.33.44&gt;
     ServerName                 customer-1.example.com
     DocumentRoot        /www/hosts/customer-1.example.com/docs
@@ -60,8 +59,7 @@
     DocumentRoot        /www/hosts/customer-N.example.com/docs
     ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
 &lt;/VirtualHost&gt;
-</pre>
-</example>
+</highlight>
 
     <p>We wish to replace these multiple
     <code>&lt;VirtualHost&gt;</code> blocks with a mechanism
@@ -149,19 +147,19 @@ mod_vhost_alias</title>
     href="#motivation">Motivation</a> section above
     using <module>mod_vhost_alias</module>.</p>
 
-<example>
-# get the server name from the Host: header<br />
-UseCanonicalName Off<br />
-<br />
-# this log format can be split per-virtual-host based on the first field<br />
-# using the split-logfile utility.<br />
-LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
-CustomLog logs/access_log vcommon<br />
-<br />
-# include the server name in the filenames used to satisfy requests<br />
-VirtualDocumentRoot /www/hosts/%0/docs<br />
+<highlight language="config">
+# get the server name from the Host: header
+UseCanonicalName Off
+
+# this log format can be split per-virtual-host based on the first field
+# using the split-logfile utility.
+LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
+CustomLog logs/access_log vcommon
+
+# include the server name in the filenames used to satisfy requests
+VirtualDocumentRoot /www/hosts/%0/docs
 VirtualScriptAlias  /www/hosts/%0/cgi-bin
-</example>
+</highlight>
 
     <p>This configuration can be changed into an IP-based virtual
     hosting solution by just turning <code>UseCanonicalName
@@ -186,18 +184,18 @@ examples.</p>
     <code>/home/user/www</code>. It uses a single <code>cgi-bin</code>
     directory instead of one per virtual host.</p>
 
-<example>
-UseCanonicalName Off<br />
-<br />
-LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
-CustomLog logs/access_log vcommon<br />
-<br />
-# include part of the server name in the filenames<br />
-VirtualDocumentRoot /home/%2/www<br />
-<br />
-# single cgi-bin directory<br />
-ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
-</example>
+<highlight language="config">
+UseCanonicalName Off
+
+LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
+CustomLog logs/access_log vcommon
+
+# include part of the server name in the filenames
+VirtualDocumentRoot /home/%2/www
+
+# single cgi-bin directory
+ScriptAlias  /cgi-bin/  /www/std-cgi/
+</highlight>
 
     <p>There are examples of more complicated
     <code>VirtualDocumentRoot</code> settings in the
@@ -217,47 +215,39 @@ ScriptAlias  /cgi-bin/  /www/std-cgi/<br
     <code>&lt;VirtualHost&gt;</code> configuration sections, as shown
     below.</p>
 
-<example>
-UseCanonicalName Off<br />
-<br />
-LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
-<br />
-&lt;Directory /www/commercial&gt;<br />
-<indent>
-    Options FollowSymLinks<br />
-    AllowOverride All<br />
-</indent>
-&lt;/Directory&gt;<br />
-<br />
-&lt;Directory /www/homepages&gt;<br />
-<indent>
-    Options FollowSymLinks<br />
-    AllowOverride None<br />
-</indent>
-&lt;/Directory&gt;<br />
-<br />
-&lt;VirtualHost 111.22.33.44&gt;<br />
-<indent>
-    ServerName www.commercial.example.com<br />
-    <br />
-    CustomLog logs/access_log.commercial vcommon<br />
-    <br />
-    VirtualDocumentRoot /www/commercial/%0/docs<br />
-    VirtualScriptAlias  /www/commercial/%0/cgi-bin<br />
-</indent>
-&lt;/VirtualHost&gt;<br />
-<br />
-&lt;VirtualHost 111.22.33.45&gt;<br />
-<indent>
-    ServerName www.homepages.example.com<br />
-    <br />
-    CustomLog logs/access_log.homepages vcommon<br />
-    <br />
-    VirtualDocumentRoot /www/homepages/%0/docs<br />
-    ScriptAlias         /cgi-bin/ /www/std-cgi/<br />
-</indent>
+<highlight language="config">
+UseCanonicalName Off
+
+LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
+
+&lt;Directory /www/commercial&gt;
+    Options FollowSymLinks
+    AllowOverride All
+&lt;/Directory&gt;
+
+&lt;Directory /www/homepages&gt;
+    Options FollowSymLinks
+    AllowOverride None
+&lt;/Directory&gt;
+
+&lt;VirtualHost 111.22.33.44&gt;
+    ServerName www.commercial.example.com
+    
+    CustomLog logs/access_log.commercial vcommon
+    
+    VirtualDocumentRoot /www/commercial/%0/docs
+    VirtualScriptAlias  /www/commercial/%0/cgi-bin
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost 111.22.33.45&gt;
+    ServerName www.homepages.example.com
+    
+    CustomLog logs/access_log.homepages vcommon
+    
+    VirtualDocumentRoot /www/homepages/%0/docs
+    ScriptAlias         /cgi-bin/ /www/std-cgi/
 &lt;/VirtualHost&gt;
-</example>
+</highlight>
 
 <note>
     <title>Note</title>
@@ -282,18 +272,18 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" 
     negating the need for a DNS lookup. Logging will also have to be adjusted
     to fit this system.</p>
 
-<example>
-# get the server name from the reverse DNS of the IP address<br />
-UseCanonicalName DNS<br />
-<br />
-# include the IP address in the logs so they may be split<br />
-LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
-CustomLog logs/access_log vcommon<br />
-<br />
-# include the IP address in the filenames<br />
-VirtualDocumentRootIP /www/hosts/%0/docs<br />
-VirtualScriptAliasIP  /www/hosts/%0/cgi-bin<br />
-</example>
+<highlight language="config">
+# get the server name from the reverse DNS of the IP address
+UseCanonicalName DNS
+
+# include the IP address in the logs so they may be split
+LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
+CustomLog logs/access_log vcommon
+
+# include the IP address in the filenames
+VirtualDocumentRootIP /www/hosts/%0/docs
+VirtualScriptAliasIP  /www/hosts/%0/cgi-bin
+</highlight>
 
 </section>
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/vhosts/name-based.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/vhosts/name-based.xml?rev=1334000&r1=1333999&r2=1334000&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/vhosts/name-based.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/vhosts/name-based.xml Fri May  4 14:44:34 2012
@@ -127,22 +127,19 @@
     <code>other.example.com</code>, which points at the same IP address.
     Then you simply add the following to <code>httpd.conf</code>:</p>
 
-    <example>
-        &lt;VirtualHost *:80&gt;<br />
-        <indent>
-            # This first-listed virtual host is also the default for *:80
-            ServerName www.example.com<br />
-            ServerAlias example.com <br />
-            DocumentRoot /www/domain<br />
-        </indent>
-        &lt;/VirtualHost&gt;<br />
-        <br />
-        &lt;VirtualHost *:80&gt;<br />
-        <indent>ServerName other.example.com<br />
-            DocumentRoot /www/otherdomain<br />
-        </indent>
-        &lt;/VirtualHost&gt;<br />
-    </example>
+    <highlight language="config">
+&lt;VirtualHost *:80&gt;
+    # This first-listed virtual host is also the default for *:80
+    ServerName www.example.com
+    ServerAlias example.com 
+    DocumentRoot /www/domain
+&lt;/VirtualHost&gt;
+
+&lt;VirtualHost *:80&gt;
+ServerName other.example.com
+    DocumentRoot /www/otherdomain
+&lt;/VirtualHost&gt;
+    </highlight>
 
     <p>You can alternatively specify an explicit IP address in place of the
     <code>*</code> in <directive type="section" module="core"
@@ -159,9 +156,9 @@
     the listed names are other names which people can use to see that same
     web site:</p>
 
-    <example>
+    <highlight language="config">
         ServerAlias example.com *.example.com
-    </example>
+    </highlight>
 
     <p>then requests for all hosts in the <code>example.com</code> domain
will
     be served by the <code>www.example.com</code> virtual host. The wildcard
@@ -172,7 +169,7 @@
     address associated with your server.</p>
 
     <p>Name-based virtual hosts for the best-matching set of  <directive
-    type="section" module="core">virtualhost</directive>s are processsed 
+    type="section" module="core">virtualhost</directive>s are processed 
     in the order they appear in the configuration.  The first matching <directive
     module="core">ServerName</directive> or <directive module="core"
     >ServerAlias</directive> is used, with no different precedence for wildcards



Mime
View raw message