summaryrefslogtreecommitdiffstats
path: root/docs/manual
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2013-01-21 16:58:57 +0100
committerRich Bowen <rbowen@apache.org>2013-01-21 16:58:57 +0100
commit5b1b533e74e23b7b48ceee902d23a32099c96898 (patch)
treeb51f798d557f23b4eeee3f6f2ff009561e8e47f0 /docs/manual
parentRebuild (diff)
downloadapache2-5b1b533e74e23b7b48ceee902d23a32099c96898.tar.xz
apache2-5b1b533e74e23b7b48ceee902d23a32099c96898.zip
Adds vhost example from http://people.apache.org/~fabien/mod_macro/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1436433 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual')
-rw-r--r--docs/manual/mod/directives.html.de2
-rw-r--r--docs/manual/mod/directives.html.en2
-rw-r--r--docs/manual/mod/directives.html.es2
-rw-r--r--docs/manual/mod/directives.html.ja.utf82
-rw-r--r--docs/manual/mod/directives.html.ko.euc-kr2
-rw-r--r--docs/manual/mod/directives.html.tr.utf82
-rw-r--r--docs/manual/mod/directives.html.zh-cn2
-rw-r--r--docs/manual/mod/mod_macro.html.en43
-rw-r--r--docs/manual/mod/mod_macro.html.fr22
-rw-r--r--docs/manual/mod/mod_macro.xml39
10 files changed, 93 insertions, 25 deletions
diff --git a/docs/manual/mod/directives.html.de b/docs/manual/mod/directives.html.de
index 9931f7c7c0..349bd5a2c8 100644
--- a/docs/manual/mod/directives.html.de
+++ b/docs/manual/mod/directives.html.de
@@ -639,7 +639,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.en b/docs/manual/mod/directives.html.en
index a8569bd184..86d6fbce25 100644
--- a/docs/manual/mod/directives.html.en
+++ b/docs/manual/mod/directives.html.en
@@ -640,7 +640,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.es b/docs/manual/mod/directives.html.es
index 791376321f..00cd94743e 100644
--- a/docs/manual/mod/directives.html.es
+++ b/docs/manual/mod/directives.html.es
@@ -642,7 +642,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.ja.utf8 b/docs/manual/mod/directives.html.ja.utf8
index 5f90083e45..c2fb96dbb0 100644
--- a/docs/manual/mod/directives.html.ja.utf8
+++ b/docs/manual/mod/directives.html.ja.utf8
@@ -637,7 +637,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.ko.euc-kr b/docs/manual/mod/directives.html.ko.euc-kr
index 32d286360c..ed448455b0 100644
--- a/docs/manual/mod/directives.html.ko.euc-kr
+++ b/docs/manual/mod/directives.html.ko.euc-kr
@@ -637,7 +637,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.tr.utf8 b/docs/manual/mod/directives.html.tr.utf8
index 86027c5318..597f7e26ca 100644
--- a/docs/manual/mod/directives.html.tr.utf8
+++ b/docs/manual/mod/directives.html.tr.utf8
@@ -636,7 +636,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/directives.html.zh-cn b/docs/manual/mod/directives.html.zh-cn
index 896b0b43bd..2c05646aa3 100644
--- a/docs/manual/mod/directives.html.zh-cn
+++ b/docs/manual/mod/directives.html.zh-cn
@@ -635,7 +635,7 @@
<li><a href="mod_log_config.html#transferlog">TransferLog</a></li>
<li><a href="mod_mime.html#typesconfig">TypesConfig</a></li>
<li><a href="core.html#undefine" id="U" name="U">UnDefine</a></li>
-<li><a href="mod_macro.html#undefmacro">undefMacro</a></li>
+<li><a href="mod_macro.html#undefmacro">UndefMacro</a></li>
<li><a href="mod_env.html#unsetenv">UnsetEnv</a></li>
<li><a href="mod_macro.html#use">Use</a></li>
<li><a href="core.html#usecanonicalname">UseCanonicalName</a></li>
diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en
index 796a6ee4a2..7f08fbb5b9 100644
--- a/docs/manual/mod/mod_macro.html.en
+++ b/docs/manual/mod/mod_macro.html.en
@@ -42,12 +42,13 @@
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#macro">&lt;Macro&gt;</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#undefmacro">undefMacro</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#undefmacro">UndefMacro</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#use">Use</a></li>
</ul>
<h3>Topics</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> <a href="#features">Features</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
@@ -120,6 +121,44 @@ UndefMacro DirGroup
</pre>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="examples" id="examples">Examples</a></h2>
+
+<p>A common usage of <code class="module"><a href="../mod/mod_macro.html">mod_macro</a></code> is for the creation of
+dynamically-generated virtual hosts.</p>
+
+<pre class="prettyprint lang-config">
+## Define a VHost Macro for repetitive configurations
+
+&lt;Macro VHost $host $port $dir&gt;
+ Listen $port
+ &lt;VirtualHost *:$port&gt;
+
+ ServerName $host
+ DocumentRoot $dir
+
+ &lt;Directory $dir&gt;
+ # do something here...
+ &lt;/Directory&gt;
+
+ # limit access to intranet subdir.
+ &lt;Directory $dir/intranet&gt;
+ order deny,allow
+ deny from all
+ allow from 10.0.0.0/8
+ &lt;/Directory&gt;
+ &lt;/VirtualHost&gt;
+&lt;/Macro&gt;
+
+## Use of VHost with different arguments.
+
+Use VHost www.apache.org 80 /vhosts/apache/htdocs
+Use VHost example.org 8080 /vhosts/example/htdocs
+Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs
+</pre>
+
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Macro" id="Macro">&lt;Macro&gt;</a> <a name="macro" id="macro">Directive</a></h2>
@@ -153,7 +192,7 @@ UndefMacro DirGroup
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
-<div class="directive-section"><h2><a name="undefMacro" id="undefMacro">undefMacro</a> <a name="undefmacro" id="undefmacro">Directive</a></h2>
+<div class="directive-section"><h2><a name="UndefMacro" id="UndefMacro">UndefMacro</a> <a name="undefmacro" id="undefmacro">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine a macro</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UndefMacro <var>name</var></code></td></tr>
diff --git a/docs/manual/mod/mod_macro.html.fr b/docs/manual/mod/mod_macro.html.fr
index d553d53373..7dd06df9c5 100644
--- a/docs/manual/mod/mod_macro.html.fr
+++ b/docs/manual/mod/mod_macro.html.fr
@@ -46,7 +46,7 @@ de configuration Apache.</td></tr>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#macro">&lt;Macro&gt;</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#undefmacro">undefMacro</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#undefmacro">UndefMacro</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#use">Use</a></li>
</ul>
<h3>Sujets</h3>
@@ -157,24 +157,16 @@ UndefMacro DirGroup
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
-<div class="directive-section"><h2><a name="undefMacro" id="undefMacro">undefMacro</a> <a name="undefmacro" id="undefmacro">Directive</a></h2>
+<div class="directive-section"><h2><a name="UndefMacro" id="UndefMacro">UndefMacro</a> <a name="undefmacro" id="undefmacro">Directive</a></h2>
<table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Efface une macro</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>UndefMacro <var>nom</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine a macro</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>UndefMacro <var>name</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration du serveur, serveur virtuel, répertoire</td></tr>
<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_macro</td></tr>
-</table>
- <p>La directive <code class="directive">UndefMacro</code> efface la définition
- d'une macro, qui doit avoir été définie auparavant.</p>
-
- <pre class="prettyprint lang-config">
-UndefMacro LocalAccessPolicy
-UndefMacro RestrictedAccessPolicy
- </pre>
-
-
-</div>
+</table><p>La documentation de cette directive
+ n'a pas encore t traduite. Veuillez vous reporter la version
+ en langue anglaise.</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Use" id="Use">Use</a> <a name="use" id="use">Directive</a></h2>
<table class="directive">
diff --git a/docs/manual/mod/mod_macro.xml b/docs/manual/mod/mod_macro.xml
index 26e32aa6b5..7dcb8505d1 100644
--- a/docs/manual/mod/mod_macro.xml
+++ b/docs/manual/mod/mod_macro.xml
@@ -106,6 +106,43 @@ UndefMacro DirGroup
</section>
+<section id="examples"><title>Examples</title>
+
+<p>A common usage of <module>mod_macro</module> is for the creation of
+dynamically-generated virtual hosts.</p>
+
+<highlight language="config">
+## Define a VHost Macro for repetitive configurations
+
+&lt;Macro VHost $host $port $dir&gt;
+ Listen $port
+ &lt;VirtualHost *:$port&gt;
+
+ ServerName $host
+ DocumentRoot $dir
+
+ &lt;Directory $dir&gt;
+ # do something here...
+ &lt;/Directory&gt;
+
+ # limit access to intranet subdir.
+ &lt;Directory $dir/intranet&gt;
+ order deny,allow
+ deny from all
+ allow from 10.0.0.0/8
+ &lt;/Directory&gt;
+ &lt;/VirtualHost&gt;
+&lt;/Macro&gt;
+
+## Use of VHost with different arguments.
+
+Use VHost www.apache.org 80 /vhosts/apache/htdocs
+Use VHost example.org 8080 /vhosts/example/htdocs
+Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs
+</highlight>
+
+</section>
+
<!-- Macro -->
<directivesynopsis type="section">
<name>Macro</name>
@@ -178,7 +215,7 @@ Require ip 192.54.172.0/24 192.54.148.0/24
<!-- UndefMacro -->
<directivesynopsis>
-<name>undefMacro</name>
+<name>UndefMacro</name>
<description>Undefine a macro</description>
<syntax>UndefMacro <var>name</var></syntax>