openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

README.md (941B)


      1 # Configuration
      2 
      3 This is the right place for your configuration files.
      4 
      5 All configuration files are in the [YAML](https://en.wikipedia.org/wiki/YAML) syntax.
      6 
      7 ## Using includes
      8 
      9 Configuration files may include other files, example:
     10 
     11 ```
     12 include: other-config-file.yml
     13 ```
     14 
     15 ## Using environment variables
     16 
     17 ```
     18 include: ${env:YOUR_ENV_VAR}.yml
     19 ```
     20 
     21 or
     22 
     23 ```
     24 include: /etc/openrat/config-${http:host}.yml
     25 ```
     26 
     27 ## Security warning
     28 
     29 SECURITY WARNING **Do not place any sensitive data like passwords in world readable files here** 
     30 
     31 
     32 ### Best way for securing your configuration files
     33 
     34 
     35 Outside of the document root, like
     36 
     37 ```
     38 include:
     39   - /etc/openrat/config.yml
     40 ```
     41 
     42 ### Mask the configuration files as PHP files
     43  
     44 ```
     45 include:
     46   - ./config.yml.php
     47 ```
     48 
     49 And the file `config.yml.php`:
     50 
     51 ```
     52 # vim: filetype=yaml
     53 # <?php http_send_status(403); ?>
     54 
     55 database:
     56   example:
     57     user       :  user
     58     password   :  pass
     59     host       :  localhost
     60 ```
     61