From fa9eb1168029b05a18f21d7a30786c4e21fddc12 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 29 Mar 2018 12:10:32 +0200 Subject: Clarify the documentation wrt. configuration files This should close #172 --- doc/source/config.rst | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/doc/source/config.rst b/doc/source/config.rst index a022ddb..d8389b6 100644 --- a/doc/source/config.rst +++ b/doc/source/config.rst @@ -1,19 +1,6 @@ Configuration ============= -Since PHP *ini-like* configuration model isn't flexible enough, -Snuffleupagus is using its own format in the file specified by -the directive ``sp.configuration_file`` (in your ``php.ini`` file), -like ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules``. - -You can use the ``,`` separator to include multiple configuration files: -``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules,/etc/php/conf.d/sp_wordpress.rules``. - -We're also also supporting `glob `__, -so you can write something like: -``sp.configuration_file=/etc/php/conf.d/*.rules,/etc/php/conf.d/extra/test.rules``. - - Options are chainable by using dots (``.``) and string parameters **must** be quoted, while booleans and integers aren't. @@ -39,6 +26,29 @@ but will write a warning in the log. The rules are evaluated in the order that they are written, the **first** one to match will terminate the evaluation (except for rules in simulation mode). +Configuration file format +------------------------- + +Since PHP *ini-like* configuration model isn't flexible enough, +Snuffleupagus is using its own format in the file specified by +the directive ``sp.configuration_file`` **in** your ``php.ini`` file, +like ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules``. + +You can use the ``,`` separator to include multiple configuration files: +``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules,/etc/php/conf.d/sp_wordpress.rules``. + +We're also also supporting `glob `__, +so you can write something like: +``sp.configuration_file=/etc/php/conf.d/*.rules,/etc/php/conf.d/extra/test.rules``. + +To sum up, you should put this in your ``php.ini``: + +:: + + module=snuffleupagus.so + sp.configuration_file=/path/to/your/snufflepagus/rules/file.rules + +And the **snuffleupagus rules** into the ``.rules`` files. Miscellaneous ------------- -- cgit v1.3