openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit 6fcc3e87a532ffca90af65ce682ba48967e272c5
parent cfdce39dcf221afa8d044a5906d0f3e8925a15bb
Author: Jan Dankert <develop@jandankert.de>
Date:   Thu, 27 Aug 2020 22:14:41 +0200

New: Config file documentation.

Diffstat:
config/README.md | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/config.yml | 2+-
2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/config/README.md b/config/README.md @@ -0,0 +1,61 @@ +# Configuration + +This is the right place for your configuration files. + +All configuration files are in the [YAML](https://en.wikipedia.org/wiki/YAML) syntax. + +## Using includes + +Configuration files may include other files, example: + +``` +include: other-config-file.yml +``` + +## Using environment variables + +``` +include: ${env:YOUR_ENV_VAR}.yml +``` + +or + +``` +include: /etc/openrat/config-${http:host}.yml +``` + +## Security warning + +SECURITY WARNING **Do not place any sensitive data like passwords in world readable files here** + + +### Best way for securing your configuration files + + +Outside of the document root, like + +``` +include: + - /etc/openrat/config.yml +``` + +### Mask the configuration files as PHP files + +``` +include: + - ./config.yml.php +``` + +And the file `config.yml.php`: + +``` +# vim: filetype=yaml +# <?php http_send_status(403); ?> + +database: + example: + user : user + password : pass + host : localhost +``` + diff --git a/config/config.yml b/config/config.yml @@ -6,7 +6,7 @@ # Security warning: # Place your sensitive configuration outside of your document root! - +# DO NOT PLACE ANY SENSITIVE INFORMATION HERE - THIS FILE IS WORLD READABLE! database: db: