From: Rich Bowen Date: Mon, 21 Jan 2013 15:58:57 +0000 (+0000) Subject: Adds vhost example from http://people.apache.org/~fabien/mod_macro/ X-Git-Tag: 2.5.0-alpha~5835 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b1b533e74e23b7b48ceee902d23a32099c96898;p=apache 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 --- 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • -
  • undefMacro
  • +
  • UndefMacro
  • UnsetEnv
  • Use
  • UseCanonicalName
  • 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 @@

    Directives

    Topics

    top
    @@ -120,6 +121,44 @@ UndefMacro DirGroup +
    top
    +
    +

    Examples

    + +

    A common usage of mod_macro is for the creation of +dynamically-generated virtual hosts.

    + +
    +## Define a VHost Macro for repetitive configurations
    +
    +<Macro VHost $host $port $dir>
    +  Listen $port
    +  <VirtualHost *:$port>
    +
    +    ServerName $host
    +    DocumentRoot $dir
    +
    +    <Directory $dir>
    +      # do something here...
    +    </Directory>
    +
    +    # limit access to intranet subdir.
    +    <Directory $dir/intranet>
    +      order deny,allow
    +      deny from all
    +      allow from 10.0.0.0/8
    +    </Directory>
    +  </VirtualHost>
    +</Macro>
    +
    +## 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
    +
    + +
    top

    <Macro> Directive

    @@ -153,7 +192,7 @@ UndefMacro DirGroup
    top
    -

    undefMacro Directive

    +

    UndefMacro Directive

    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.

    Directives

    Sujets

    @@ -157,24 +157,16 @@ UndefMacro DirGroup
    top
    -
    Description:Undefine a macro
    Syntax:UndefMacro name
    - - + + -
    Description:Efface une macro
    Syntaxe:UndefMacro nom
    Description:Undefine a macro
    Syntaxe:UndefMacro name
    Contexte:configuration du serveur, serveur virtuel, répertoire
    Statut:Base
    Module:mod_macro
    -

    La directive UndefMacro efface la définition - d'une macro, qui doit avoir été définie auparavant.

    - -
    -UndefMacro LocalAccessPolicy
    -UndefMacro RestrictedAccessPolicy
    -    
    - - -
    +

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    top

    Use 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 +
    Examples + +

    A common usage of mod_macro is for the creation of +dynamically-generated virtual hosts.

    + + +## Define a VHost Macro for repetitive configurations + +<Macro VHost $host $port $dir> + Listen $port + <VirtualHost *:$port> + + ServerName $host + DocumentRoot $dir + + <Directory $dir> + # do something here... + </Directory> + + # limit access to intranet subdir. + <Directory $dir/intranet> + order deny,allow + deny from all + allow from 10.0.0.0/8 + </Directory> + </VirtualHost> +</Macro> + +## 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 + + +
    + Macro @@ -178,7 +215,7 @@ Require ip 192.54.172.0/24 192.54.148.0/24 -undefMacro +UndefMacro Undefine a macro UndefMacro name