21 lines
1.0 KiB
PHP
21 lines
1.0 KiB
PHP
<?php
|
|
// Template for the secrets file read by config.php (chmod 600). Locations, in order:
|
|
// /home/<akun>/.serubi/secrets.php outside the document root (preferred)
|
|
// <app folder>/.serubi/secrets.php when the hosting gives no access above the
|
|
// document root; .serubi/.htaccess denies HTTP
|
|
// or point SERUBI_SECRETS_FILE to another location.
|
|
//
|
|
// Generate app_key once: php -r "echo base64_encode(random_bytes(32)), PHP_EOL;"
|
|
// Keep app_key unchanged afterwards: it decrypts the admins' OTP secrets.
|
|
return [
|
|
'db_host' => 'localhost',
|
|
'db_port' => 3306,
|
|
'db_name' => 'NAMA_DATABASE',
|
|
'db_user' => 'USER_DATABASE', // user khusus aplikasi, hanya SELECT/INSERT/UPDATE/DELETE
|
|
'db_pass' => 'PASSWORD_DATABASE',
|
|
'app_key' => 'HASIL_base64_encode(random_bytes(32))',
|
|
// 'trusted_proxies' => '', // IP reverse proxy, dipisah koma (kosongkan bila tidak ada)
|
|
// 'force_https' => '1',
|
|
// 'cache_dir' => '/home/<akun>/.serubi/cache',
|
|
];
|