htconfig.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. // If automatic system installation fails:
  3. //die('The configuration you did manually contains some mistakes. Please have a look at your .htconfig.php file.');
  4. // If you are doing the configuration manually, please remove the line above
  5. // Copy or rename this file to .htconfig.php
  6. // Why .htconfig.php? Because it contains sensitive information which could
  7. // give somebody complete control of your database. Apache's default
  8. // configuration denies access to and refuses to serve any file beginning
  9. // with .ht
  10. // Then set the following for your MySQL installation
  11. $db_host = 'your.mysqlhost.com';
  12. $db_user = 'mysqlusername';
  13. $db_pass = 'mysqlpassword';
  14. $db_data = 'mysqldatabasename';
  15. // Use environment variables for mysql if they are set beforehand
  16. if (!empty(getenv('MYSQL_HOST'))
  17. && !empty(getenv('MYSQL_PORT'))
  18. && !empty(getenv('MYSQL_USERNAME'))
  19. && !empty(getenv('MYSQL_PASSWORD'))
  20. && !empty(getenv('MYSQL_DATABASE'))) {
  21. $db_host = getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT');
  22. $db_user = getenv('MYSQL_USERNAME');
  23. $db_pass = getenv('MYSQL_PASSWORD');
  24. $db_data = getenv('MYSQL_DATABASE');
  25. }
  26. // Set the database connection charset to full Unicode (utf8mb4).
  27. // Changing this value will likely corrupt the special characters.
  28. // You have been warned.
  29. $a->config['system']['db_charset'] = "utf8mb4";
  30. // Choose a legal default timezone. If you are unsure, use "America/Los_Angeles".
  31. // It can be changed later and only applies to timestamps for anonymous viewers.
  32. $default_timezone = 'America/Los_Angeles';
  33. // Default system language
  34. $a->config['system']['language'] = 'en';
  35. // What is your site name?
  36. $a->config['sitename'] = "Friendica Social Network";
  37. // Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
  38. // Be certain to create your own personal account before setting
  39. // REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
  40. // the registration page. REGISTER_APPROVE requires you set 'admin_email'
  41. // to the email address of an already registered person who can authorise
  42. // and/or approve/deny the request.
  43. // In order to perform system administration via the admin panel, admin_email
  44. // must precisely match the email address of the person logged in.
  45. $a->config['register_policy'] = REGISTER_OPEN;
  46. $a->config['register_text'] = '';
  47. $a->config['admin_email'] = 'admin@example.com';
  48. // Maximum size of an imported message, 0 is unlimited
  49. $a->config['max_import_size'] = 200000;
  50. // maximum size of uploaded photos
  51. $a->config['system']['maximagesize'] = 800000;
  52. // Location of PHP command line processor
  53. $a->config['php_path'] = 'php';
  54. // Server-to-server private message encryption (RINO) is allowed by default.
  55. // set to 0 to disable, 1 to enable
  56. $a->config['system']['rino_encrypt'] = 1;
  57. // allowed themes (change this from admin panel after installation)
  58. $a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero,smoothly,frio';
  59. // default system theme
  60. $a->config['system']['theme'] = 'vier';
  61. // By default allow pseudonyms
  62. $a->config['system']['no_regfullname'] = true;
  63. //Deny public access to the local directory
  64. //$a->config['system']['block_local_dir'] = false;
  65. // Location of the global directory
  66. $a->config['system']['directory'] = getenv('APP_ORIGIN');
  67. // Allowed protocols in link URLs; HTTP protocols always are accepted
  68. $a->config['system']['allowed_link_protocols'] = ['ftp', 'ftps', 'mailto', 'cid', 'gopher'];
  69. // Authentication cookie lifetime, in days
  70. $a->config['system']['auth_cookie_lifetime'] = 7;