diff options
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/config.rst | 36 |
1 files 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 @@ | |||
| 1 | Configuration | 1 | Configuration |
| 2 | ============= | 2 | ============= |
| 3 | 3 | ||
| 4 | Since PHP *ini-like* configuration model isn't flexible enough, | ||
| 5 | Snuffleupagus is using its own format in the file specified by | ||
| 6 | the directive ``sp.configuration_file`` (in your ``php.ini`` file), | ||
| 7 | like ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules``. | ||
| 8 | |||
| 9 | You can use the ``,`` separator to include multiple configuration files: | ||
| 10 | ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules,/etc/php/conf.d/sp_wordpress.rules``. | ||
| 11 | |||
| 12 | We're also also supporting `glob <https://en.wikipedia.org/wiki/Glob_%28programming%29>`__, | ||
| 13 | so you can write something like: | ||
| 14 | ``sp.configuration_file=/etc/php/conf.d/*.rules,/etc/php/conf.d/extra/test.rules``. | ||
| 15 | |||
| 16 | |||
| 17 | Options are chainable by using dots (``.``) and string parameters | 4 | Options are chainable by using dots (``.``) and string parameters |
| 18 | **must** be quoted, while booleans and integers aren't. | 5 | **must** be quoted, while booleans and integers aren't. |
| 19 | 6 | ||
| @@ -39,6 +26,29 @@ but will write a warning in the log. | |||
| 39 | The rules are evaluated in the order that they are written, the **first** one | 26 | The rules are evaluated in the order that they are written, the **first** one |
| 40 | to match will terminate the evaluation (except for rules in simulation mode). | 27 | to match will terminate the evaluation (except for rules in simulation mode). |
| 41 | 28 | ||
| 29 | Configuration file format | ||
| 30 | ------------------------- | ||
| 31 | |||
| 32 | Since PHP *ini-like* configuration model isn't flexible enough, | ||
| 33 | Snuffleupagus is using its own format in the file specified by | ||
| 34 | the directive ``sp.configuration_file`` **in** your ``php.ini`` file, | ||
| 35 | like ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules``. | ||
| 36 | |||
| 37 | You can use the ``,`` separator to include multiple configuration files: | ||
| 38 | ``sp.configuration_file=/etc/php/conf.d/snuffleupagus.rules,/etc/php/conf.d/sp_wordpress.rules``. | ||
| 39 | |||
| 40 | We're also also supporting `glob <https://en.wikipedia.org/wiki/Glob_%28programming%29>`__, | ||
| 41 | so you can write something like: | ||
| 42 | ``sp.configuration_file=/etc/php/conf.d/*.rules,/etc/php/conf.d/extra/test.rules``. | ||
| 43 | |||
| 44 | To sum up, you should put this in your ``php.ini``: | ||
| 45 | |||
| 46 | :: | ||
| 47 | |||
| 48 | module=snuffleupagus.so | ||
| 49 | sp.configuration_file=/path/to/your/snufflepagus/rules/file.rules | ||
| 50 | |||
| 51 | And the **snuffleupagus rules** into the ``.rules`` files. | ||
| 42 | 52 | ||
| 43 | Miscellaneous | 53 | Miscellaneous |
| 44 | ------------- | 54 | ------------- |
