Differences
This shows you the differences between two versions of the page.
— |
documentation:2.1:customhandlers [2019/01/15 15:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Custom handlers ====== | ||
+ | |||
+ | LLNG provides Perl libraries that can be easily used by inheritance. So you can write your own handlers but you need first to understand [[handlerarch|Handler architecture]] | ||
+ | |||
+ | ===== Add a new handler type ===== | ||
+ | |||
+ | - Write your new Module (in Lemonldap/ | ||
+ | - Write a wrapper in each platform directory //(see Lemonldap:: | ||
+ | |||
+ | Wrapper usually look at this: | ||
+ | <file perl> | ||
+ | package Lemonldap:: | ||
+ | |||
+ | use base ' | ||
+ | |||
+ | 1; | ||
+ | </ | ||
+ | |||
+ | ==== Enable it ==== | ||
+ | |||
+ | Your wrappers must be named " | ||
+ | |||
+ | You can enable it either: | ||
+ | * by setting a '' | ||
+ | * by setting a '' | ||
+ | * by adding it to the menu: add its name in '' | ||
+ | |||
+ | Note that configuration parameter can be set only in lemonldap-ng.ini configuration file //(section Handler)//. | ||
+ | |||
+ | ===== Add a new platform ===== | ||
+ | |||
+ | LLNG provides 3 platforms: | ||
+ | * ApacheMP2 | ||
+ | * FastCGI server //(Nginx is build from there)// | ||
+ | * Auto-protected PSGI | ||
+ | |||
+ | If you want to add another, you must write: | ||
+ | * the platform launcher file that launch the required type //(see '' | ||
+ | * write the main platform file ('' | ||
+ | * write the " | ||
+ | |||
+ | Wrapper usually look at this: | ||
+ | <file perl> | ||
+ | package Lemonldap:: | ||
+ | |||
+ | use base ' | ||
+ | |||
+ | 1; | ||
+ | </ | ||
+ | |||
+ | ===== Old fashion Nginx handlers ===== | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | Three actions are needed: | ||
+ | * declare your own module in the manager " | ||
+ | * in your Nginx configuration file, add '' | ||
+ | * restart FastCGI server(s) //(reload is not enough here)// | ||