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.
+This is useful in case of hardening the system by separating configuration from program binaries.
### Static Configuration location
</tr>
<tr>
<td><pre>
-$a->path = "value";
-</pre></td>
- <td><pre>
-'system' => [
- 'urlpath' => 'value',
-],
-</pre></td>
- </tr>
- <tr>
- <td><pre>
$default_timezone = "value";
</pre></td>
<td><pre>
'config' => [
'admin_email' => 'someone@example.com',
]
-
+
Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
If more than one account should be able to access the admin panel, separate the email addresses with a comma.
- `-U|--dbuser <username>` The username of the mysql/mariadb database login (env `MYSQL_USER` or `MYSQL_USERNAME`)
- `-P|--dbpass <password>` The password of the mysql/mariadb database login (env `MYSQL_PASSWORD`)
- `-d|--dbdata <database>` The name of the mysql/mariadb database (env `MYSQL_DATABASE`)
-- `-u|--urlpath <url_path>` The URL path of Friendica - f.e. '/friendica' (env `FRIENDICA_URL_PATH`)
- `-b|--phppath <php_path>` The path of the PHP binary (env `FRIENDICA_PHP_PATH`)
- `-A|--admin <mail>` The admin email address of Friendica (env `FRIENDICA_ADMIN_MAIL`)
- `-T|--tz <timezone>` The timezone of Friendica (env `FRIENDICA_TZ`)
Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
'system' => [
- 'urlpath' => 'tests/friendica',
+ 'url' => 'https://example.com/tests/friendica',
],
## Other exceptions
Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfĂĽr:
'system' => [
- 'urlpath' => 'tests/friendica',
+ 'url' => 'https://example.com/tests/friendica',
],
## Weitere Ausnahmen
use Psr\Log\LoggerInterface;
/**
- * A class which checks and contains the basic
- * environment for the BaseURL (url, urlpath, ssl_policy, hostname, scheme)
+ * A class which checks and contains the basic environment for the BaseURL (url)
*/
class BaseURL extends Uri implements UriInterface
{
// Display "Emoji Only" posts in big.
'big_emojis' => true,
+ // basepath (String)
+ // Absolute file path to your Friendica install
+ // Examples: /var/www, /home/user/friendica...
+ 'basepath' => '',
+
// bulk_delivery (Boolean)
// Delivers AP messages in a bulk (experimental)
'bulk_delivery' => false,
// Transmit pending events upon accepted contact request for groups
'transmit_pending_events' => false,
+ // url (String)
+ // The absolute URL used to access your Friendica node. It should include the scheme, the domain name, and the
+ // sub-folder if any. Used by command-line processes to send correct links to your Friendica server.
+ // Example: https://example.com/friendica
+ 'url' => '',
+
// username_min_length (Integer)
// The minimum character length a username can be.
// This length is checked once the username has been trimmed and multiple spaces have been collapsed into one.
'temppath' => '/tmp/friendica.local',
'theme' => 'frio',
'url' => 'https://friendica.local',
- 'urlpath' => '',
'build' => 1508,
'maintenance' => false,
'dbupdate' => 1,
],
'system' => [
'basepath' => '',
- 'urlpath' => '',
'url' => 'http://friendica.local',
'ssl_policy' => 0,
'default_timezone' => '',
'admin_email' => 'admin@philipp.info',
],
'system' => [
- 'urlpath' => 'test/it',
'url' => 'http://friendica.local/test/it',
'basepath' => '',
'ssl_policy' => '2',
'admin_email' => 'admin@philipp.info',
],
'system' => [
- 'urlpath' => 'test/it',
'url' => 'https://friendica.local/test/it',
'basepath' => '',
'ssl_policy' => '1',
self::assertConfigEntry('system', 'default_timezone', $assertion, ($default) ? Installer::DEFAULT_TZ : null);
self::assertConfigEntry('system', 'language', $assertion, ($default) ? Installer::DEFAULT_LANG : null);
self::assertConfigEntry('system', 'url', $assertion);
- self::assertConfigEntry('system', 'urlpath', $assertion);
self::assertConfigEntry('system', 'ssl_policy', $assertion, ($default) ? App\BaseURL::DEFAULT_SSL_SCHEME : null);
self::assertConfigEntry('system', 'basepath', ($realBasepath) ? $this->root->url() : $assertion);
}
],
'system' => [
'basepath' => '{$conf('system', 'basepath')}',
- 'urlpath' => '{$conf('system', 'urlpath')}',
'url' => '{$conf('system', 'url')}',
'ssl_policy' => '{$conf('system', 'ssl_policy')}',
'default_timezone' => '{$conf('system', 'default_timezone')}',
self::assertStuckDB($txt);
self::assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
- self::assertConfig(['config' => ['hostname' => 'friendica.local'], 'system' => ['url' => 'http://friendica.local', 'ssl_policy' => 0, 'urlpath' => '']], false, true, false, true);
+ self::assertConfig(['config' => ['hostname' => 'friendica.local'], 'system' => ['url' => 'http://friendica.local', 'ssl_policy' => 0]], false, true, false, true);
}
public function testGetHelp()