X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2FConfig.md;h=8855099391d5dabd99fe4b4f9dd94fd0b0a0a8ef;hb=612e91b603a5a5817839d04d120e1cf672b8a80e;hp=f85ceb4985ca71d88438bfc1356aaf9bd49b845a;hpb=1b30c684f31e370fe2bf7a1f59f980e0399747ab;p=friendica.git diff --git a/doc/Config.md b/doc/Config.md index f85ceb4985..8855099391 100644 --- a/doc/Config.md +++ b/doc/Config.md @@ -33,15 +33,27 @@ return [ ### Configuration location -The `config` directory holds key configuration files: +The `config` directory holds key configuration files and can have different config files. +All of them have to end with `.config.php` and must not include `-sample` in their name. -- `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`. -- `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page. +Some examples of common known configuration files: - `local.config.php` holds the current node custom configuration. - `addon.config.php` is optional and holds the custom configuration for specific addons. Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated. +If needed, an alternative `config` path can be used by using the `FRIENDICA_CONFIG_DIR` environment variable (full path required!). +This is useful in case of hardening the system by separating configuration from program binaries. + +### Static Configuration location + +The `static` directory holds the codebase default configurations files. +They must not be changed by users, because they can get changed from release to release. + +Currently, the following configurations are included: +- `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`. +- `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page. + #### Migrating from .htconfig.php to config/local.config.php The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release. @@ -136,6 +148,16 @@ $a->config["key"] = "value"; ], + +
+$a->config['register_policy'] = REGISTER_CLOSED;
+
+
+'config' => [
+    'register_policy' => \Friendica\Module\Register::CLOSED,
+],
+
+
 $a->path = "value";
@@ -225,6 +247,17 @@ key = value
 ],
 
+ +
+[config]
+register_policty = REGISTER_CLOSED
+
+
+'config' => [
+    'register_policy' => \Friendica\Module\Register::CLOSED,
+],
+
+
 [section]
@@ -250,7 +283,6 @@ If you need to specify a port to access the database, you can do so by appending
 
     'database' => [
         'hostname' => 'your.mysqlhost.com:123456',
-        ...
     ]
 
 If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
@@ -272,7 +304,7 @@ Or it is for testing purposes only.
 **Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
 Especially don't do that with undocumented values.
 
-These configurations keys and their default value are listed in `config/defaults.config.php` and should be overwritten in `config/local.config.php`.
+These configurations keys and their default value are listed in `static/defaults.config.php` and should be overwritten in `config/local.config.php`.
 
 ## Administrator Options