From: Rainer Jung Date: Fri, 3 Oct 2014 17:11:26 +0000 (+0000) Subject: Backport of r1629239, r1629244, 1629250: X-Git-Tag: 2.4.11~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50977cda4d8fa16f0bb98fe915a38c7e3c8dbebb;p=apache Backport of r1629239, r1629244, 1629250: Adjust docs for renaming of mod_example to mod_example_hooks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1629262 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/allmodules.xml b/docs/manual/mod/allmodules.xml index 592dce2a02..48e61762b6 100644 --- a/docs/manual/mod/allmodules.xml +++ b/docs/manual/mod/allmodules.xml @@ -46,7 +46,7 @@ mod_dumpio.xml mod_echo.xml mod_env.xml - mod_example.xml + mod_example_hooks.xml mod_expires.xml mod_ext_filter.xml mod_file_cache.xml diff --git a/docs/manual/mod/mod_example.html b/docs/manual/mod/mod_example_hooks.html similarity index 100% rename from docs/manual/mod/mod_example.html rename to docs/manual/mod/mod_example_hooks.html diff --git a/docs/manual/mod/mod_example.html.en b/docs/manual/mod/mod_example_hooks.html.en similarity index 100% rename from docs/manual/mod/mod_example.html.en rename to docs/manual/mod/mod_example_hooks.html.en diff --git a/docs/manual/mod/mod_example.html.fr b/docs/manual/mod/mod_example_hooks.html.fr similarity index 100% rename from docs/manual/mod/mod_example.html.fr rename to docs/manual/mod/mod_example_hooks.html.fr diff --git a/docs/manual/mod/mod_example.html.ko.euc-kr b/docs/manual/mod/mod_example_hooks.html.ko.euc-kr similarity index 100% rename from docs/manual/mod/mod_example.html.ko.euc-kr rename to docs/manual/mod/mod_example_hooks.html.ko.euc-kr diff --git a/docs/manual/mod/mod_example.xml b/docs/manual/mod/mod_example_hooks.xml similarity index 79% rename from docs/manual/mod/mod_example.xml rename to docs/manual/mod/mod_example_hooks.xml index 36f66a52c7..dfb9655b8d 100644 --- a/docs/manual/mod/mod_example.xml +++ b/docs/manual/mod/mod_example_hooks.xml @@ -20,40 +20,40 @@ limitations under the License. --> - + -mod_example +mod_example_hooks Illustrates the Apache module API Experimental -mod_example.c -example_module +mod_example_hooks.c +example_hooks_module -

Some files in the modules/experimental directory +

The files in the modules/examples directory under the Apache distribution directory tree are provided as an example to those that wish to write modules that use the Apache API.

-

The main file is mod_example.c, which +

The main file is mod_example_hooks.c, which illustrates all the different callback mechanisms and call syntaxes. By no means does an add-on module need to include routines for all of the callbacks - quite the contrary!

The example module is an actual working module. If you link - it into your server, enable the "example-handler" handler for a + it into your server, enable the "example-hooks-handler" handler for a location, and then browse to that location, you will see a display of some of the tracing the example module did as the various callbacks were made.

-
Compiling the example module +
Compiling the example_hooks module -

To include the example module in your server, follow the +

To include the example_hooks module in your server, follow the steps below:

  1. - Run configure with --enable-example + Run configure with --enable-example-hooks option.
  2. Make the server (run "make").
  3. @@ -62,7 +62,7 @@

    To add another module of your own:

      -
    1. cp modules/experimental/mod_example.c +
    2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
    3. Modify the file.
    4. @@ -70,9 +70,9 @@
    5. Create modules/new_module/config.m4.
      1. Add APACHE_MODPATH_INIT(new_module).
      2. -
      3. Copy APACHE_MODULE line with "example" from - modules/experimental/config.m4.
      4. -
      5. Replace the first argument "example" with myexample.
      6. +
      7. Copy APACHE_MODULE line with "example_hooks" from + modules/examples/config.m4.
      8. +
      9. Replace the first argument "example_hooks" with myexample.
      10. Replace the second argument with brief description of your module. It will be used in configure --help.
      11. If your module needs additional C compiler flags, linker flags or @@ -95,13 +95,13 @@
-
Using the <code>mod_example</code> Module +
Using the <code>mod_example_hooks</code> Module -

To activate the example module, include a block similar to +

To activate the example_hooks module, include a block similar to the following in your httpd.conf file:

-<Location /example-info> - SetHandler example-handler +<Location /example-hooks-info> + SetHandler example-hooks-handler </Location> @@ -109,7 +109,7 @@ href="core.html#accessfilename">.htaccess file and then request the file "test.example" from that location:

- AddHandler example-handler .example + AddHandler example-hooks-handler .example

After reloading/restarting your server, you should be able @@ -130,7 +130,7 @@ API

The Example directive just sets a demonstration flag which the example module's content handler displays. It takes no arguments. If you browse to an URL to which the - example content-handler applies, you will get a display of the + example-hooks content-handler applies, you will get a display of the routines within the module and how and in what order they were called to service the document request. The effect of this directive one can observe under the point "Example diff --git a/docs/manual/mod/mod_example.xml.fr b/docs/manual/mod/mod_example_hooks.xml.fr similarity index 78% rename from docs/manual/mod/mod_example.xml.fr rename to docs/manual/mod/mod_example_hooks.xml.fr index d96bf8c350..5e31dd8b43 100644 --- a/docs/manual/mod/mod_example.xml.fr +++ b/docs/manual/mod/mod_example_hooks.xml.fr @@ -22,41 +22,41 @@ limitations under the License. --> - + -mod_example +mod_example_hooks Illustration de l'API des modules Apache Experimental -mod_example.c -example_module +mod_example_hooks.c +example_hooks_module

Certains fichiers situés dans le répertoire - modules/experimental de l'arborescence de la + modules/examples de l'arborescence de la distribution d'Apache sont fournis à titre d'exemples pour ceux qui souhaitent écrire des modules qui utilisent l'API d'Apache.

-

Le fichier principal est mod_example.c, qui +

Le fichier principal est mod_example_hooks.c, qui constitue une illustration exhaustive des différents mécanismes et syntaxes d'appels. En aucun cas un module additionnel n'aura à inclure des routines pour tous les appels - il n'en nécessitera au contraire qu'un petit nombre !

-

Le module example fonctionne réellement. Si vous le chargez dans - votre serveur, activez le gestionnaire "example-handler" dans une +

Le module example_hooks fonctionne réellement. Si vous le chargez dans + votre serveur, activez le gestionnaire "example-hooks-handler" dans une section location, et essayez d'accéder à la zone du site web correspondante, vous verrez s'afficher certaines sorties que le - module example produit au cours des différents appels.

+ module example_hooks produit au cours des différents appels.

-
Compilation du module example +
Compilation du module example_hooks -

Pour inclure le module example dans votre serveur, effectuez les +

Pour inclure le module example_hooks dans votre serveur, effectuez les étapes suivantes :

  1. Exécutez configure avec l'option - --enable-example.
  2. + --enable-example-hooks.
  3. Compilez le serveur (exécutez la commande "make").
  4. @@ -65,7 +65,7 @@

    Pour ajouter votre propre module :

      -
    1. cp modules/experimental/mod_example.c +
    2. cp modules/examples/mod_example_hooks.c modules/nouveau_module/mod_monexemple.c
    3. Modifiez le fichier.
    4. @@ -73,9 +73,9 @@
    5. Créez modules/nouveau_module/config.m4.
      1. Ajoutez APACHE_MODPATH_INIT(nouveau_module).
      2. -
      3. Copiez la ligne APACHE_MODULE contenant "example" depuis - modules/experimental/config.m4.
      4. -
      5. Remplacez le premier argument "example" par +
      6. Copiez la ligne APACHE_MODULE contenant "example_hooks" depuis + modules/examples/config.m4.
      7. +
      8. Remplacez le premier argument "example-hooks" par monexemple.
      9. Remplacez le second argument par une brève description de votre module. Cette description sera utilisée par la commande @@ -105,13 +105,13 @@
Utilisation du module -<code>mod_example</code> +mod_example_hooks -

Pour activer le module example, ajoutez à votre fichier +

Pour activer le module example_hooks, ajoutez à votre fichier httpd.conf un bloc du style :

-<Location /example-info> - SetHandler example-handler +<Location /example-hooks-info> + SetHandler example-hooks-handler </Location> @@ -121,7 +121,7 @@ correspondant :

- AddHandler example-handler .example + AddHandler example-hooks-handler .example

Après avoir rechargé la configuration ou redémarré votre serveur, @@ -141,9 +141,9 @@ Apache

La directive Example n'a pour fonction que de définir un drapeau de démonstration que le gestionnaire de - contenu du module example va afficher. Elle ne possède aucun + contenu du module example_hooks va afficher. Elle ne possède aucun argument. Si vous naviguez vers une URL à laquelle le gestionnaire - de contenu example s'applique, vous verrez s'afficher les routines + de contenu example_hooks s'applique, vous verrez s'afficher les routines du module, ainsi que l'ordre dans lequel elles ont été appelées pour servir le document demandé. On peut observer l'effet de cette directive dans la phrase "Example diff --git a/docs/manual/mod/mod_example.xml.ko b/docs/manual/mod/mod_example_hooks.xml.ko similarity index 81% rename from docs/manual/mod/mod_example.xml.ko rename to docs/manual/mod/mod_example_hooks.xml.ko index e2927d9e0a..c00928d642 100644 --- a/docs/manual/mod/mod_example.xml.ko +++ b/docs/manual/mod/mod_example_hooks.xml.ko @@ -1,7 +1,7 @@ - + - + -mod_example +mod_example_hooks ¾ÆÆÄÄ¡ ¸ðµâ API¸¦ ¼³¸íÇÑ´Ù Experimental -mod_example.c -example_module +mod_example_hooks.c +example_hooks_module

-

¾ÆÆÄÄ¡ ¹èÆ÷º» modules/experimental µð·ºÅ丮¿¡ +

¾ÆÆÄÄ¡ ¹èÆ÷º» modules/examples µð·ºÅ丮¿¡ ÀÖ´Â ÆÄÀϵéÀº ¾ÆÆÄÄ¡ API¸¦ »ç¿ëÇÏ¿© ¸ðµâÀ» ÀÛ¼ºÇÏ·Á´Â »ç¶÷µéÀ» µ½±âÀ§ÇÑ ¿¹Á¦´Ù.

-

mod_example.c´Â ¸ðµç Äݹé(callback) ±¸Á¶¿Í +

mod_example_hooks.c´Â ¸ðµç Äݹé(callback) ±¸Á¶¿Í È£Ãâ ¹®¹ýÀ» ¼³¸íÇÏ´Â ÆÄÀÏÀÌ´Ù. ´ç½ÅÀº ¸ðµâ¿¡ ÀÌ ¸ðµç ÄݹéÀ» ±¸ÇöÇÒ Çʿ䰡 ¾ø´Ù. »ç½Ç Á¤¹Ý´ë´Ù!

example ¸ðµâÀº ½ÇÁ¦·Î µ¿ÀÛÇÏ´Â ¸ðµâÀÌ´Ù. ÀÌ ¸ðµâÀ» ¼­¹ö¿¡ - ¿¬°áÇÏ°í Æ¯Á¤ À§Ä¡¿¡ "example-handler" Çڵ鷯¸¦ ÇÒ´çÇÏ¿© + ¿¬°áÇÏ°í Æ¯Á¤ À§Ä¡¿¡ "example-hooks-handler" Çڵ鷯¸¦ ÇÒ´çÇÏ¿© ±×°÷À» ºê¶ó¿ì¡Çϸé example ¸ðµâÀÇ ¿©·¯ ÄݹéÀ» È®ÀÎÇÒ ¼ö ÀÖ´Ù.

@@ -49,7 +49,7 @@
  1. - --enable-example ¿É¼Ç°ú ÇÔ²² + --enable-example-hooks ¿É¼Ç°ú ÇÔ²² configure¸¦ ½ÇÇàÇÑ´Ù.
  2. ¼­¹ö¸¦ ÄÄÆÄÀÏÇÑ´Ù ("make"¸¦ ½ÇÇàÇÑ´Ù).
  3. @@ -58,7 +58,7 @@

    ÀÚ½ÅÀÌ ¸¸µç ¸ðµâÀ» Ãß°¡ÇÏ·Á¸é:

      -
    1. cp modules/experimental/mod_example.c +
    2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
    3. ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.
    4. @@ -67,9 +67,9 @@
      1. APACHE_MODPATH_INIT(new_module)À» Ãß°¡ÇÑ´Ù.
      2. -
      3. modules/experimental/config.m4 ÆÄÀÏ¿¡¼­ - "example"ÀÌ ÀÖ´Â APACHE_MODULE ÁÙÀ» º¹»çÇØ¿Â´Ù.
      4. -
      5. ù¹øÂ° ¾Æ±Ô¸ÕÆ® "example"À» myexample·Î +
      6. modules/examples/config.m4 ÆÄÀÏ¿¡¼­ + "example_hooks"ÀÌ ÀÖ´Â APACHE_MODULE ÁÙÀ» º¹»çÇØ¿Â´Ù.
      7. +
      8. ù¹øÂ° ¾Æ±Ô¸ÕÆ® "example_hooks"À» myexample·Î º¯°æÇÑ´Ù.
      9. µÎ¹øÂ° ¾Æ±Ô¸ÕÆ® ÀÚ¸®¿¡ ÀÚ½ÅÀÌ ¸¸µç ¸ðµâ¿¡ ´ëÇÑ °£´ÜÇÑ ¼³¸íÀ» Àû´Â´Ù. configure --help¸¦ @@ -94,13 +94,13 @@
-
<code>mod_example</code> ¸ðµâ »ç¿ëÇϱâ +
<code>mod_example_hooks</code> ¸ðµâ »ç¿ëÇϱâ

example ¸ðµâÀ» »ç¿ëÇÏ·Á¸é httpd.conf ÆÄÀÏ¿¡ ´ÙÀ½°ú °°Àº ¼³Á¤À» Ãß°¡Ç϶ó:

- <Location /example-info>
- SetHandler example-handler
+ <Location /example-hooks-info>
+ SetHandler example-hooks-handler
</Location>
@@ -109,7 +109,7 @@ ÆÄÀÏ¿¡ ´ÙÀ½°ú °°Àº ³»¿ëÀ» Ãß°¡Çϰí, ±× À§Ä¡¿¡¼­ "test.example" °°Àº ÆÄÀÏÀ» ¿äûÇ϶ó:

- AddHandler example-handler .example + AddHandler example-hooks-handler .example

¼­¹ö¸¦ Àç½ÃÀÛÇÑ ÈÄ ÀÌ À§Ä¡¸¦ ºê¶ó¿ì¡ÇÏ¸é ¾Õ¿¡¼­ ¸»ÇÑ diff --git a/docs/manual/mod/mod_example.xml.meta b/docs/manual/mod/mod_example_hooks.xml.meta similarity index 75% rename from docs/manual/mod/mod_example.xml.meta rename to docs/manual/mod/mod_example_hooks.xml.meta index ddb2541c37..cd07cfa4ad 100644 --- a/docs/manual/mod/mod_example.xml.meta +++ b/docs/manual/mod/mod_example_hooks.xml.meta @@ -1,8 +1,8 @@ - - mod_example + + mod_example_hooks /mod/ ..