config.inc.sample1 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of www-conf-viewer.
  6. *
  7. * www-conf-viewer is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * www-conf-viewer is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * config.inc
  21. *
  22. * www-conf-viewer configuration settings.
  23. *
  24. * @author Daniele Bonini <my25mb@aol.com>
  25. * @copyrights (c) 2021, 2024, 5 Mode
  26. */
  27. define('DEBUG', true);
  28. define('MAX_SECURITY', true);
  29. define('APP_NAME', "www-conf-viewer");
  30. define('APP_TITLE', "www-conf-viewer: everyone its web config.");
  31. // password:
  32. // salt:
  33. define('APP_HASH', "");
  34. define('APP_SALT', "");
  35. define('APP_HOST', "conf-viewer.yoursite.com");
  36. define('APP_PATH', "/var/www/www-conf-viewer");
  37. define('APP_NGINX_CONF_PATH' , "/etc/nginx/nginx.conf");
  38. define('APP_NGINX_SERVER_CONF_PATH', "/etc/nginx/conf.d/yoursite.com.conf");
  39. define('APP_PHPFPM_CONF_PATH' , "/etc/php-fpm.conf");
  40. define('APP_EXAMPLE_PATH' , "/var/www/www-conf-viewer/CONFVW_examples");
  41. define('APP_LICENSE', <<<LICENSETEXT
  42. Copyright (c) 2016, 2024, 5 Mode
  43. All rights reserved.
  44. This file is part of www-conf-viewer.
  45. www-conf-viewer is free software: you can redistribute it and/or modify
  46. it under the terms of the GNU General Public License as published by
  47. the Free Software Foundation, either version 3 of the License, or
  48. (at your option) any later version.
  49. www-conf-viewer is distributed in the hope that it will be useful,
  50. but WITHOUT ANY WARRANTY; without even the implied warranty of
  51. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  52. GNU General Public License for more details.
  53. You should have received a copy of the GNU General Public License
  54. along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
  55. https://opensource.org/licenses/GPL-3.0
  56. LICENSETEXT
  57. );
  58. // Default Locale, in two letters format
  59. define('APP_DEF_LANG', "en-US");
  60. $CONFIG = [
  61. 'DEBUG' => true,
  62. 'MAX_SECURITY' => true,
  63. 'APP' => [
  64. 'NAME' => "www-conf-viewer",
  65. 'TITLE' => "www-conf-viewer: everyone its web config.",
  66. // password:
  67. // salt:
  68. 'HASH' => "",
  69. 'SALT' => "",
  70. 'HOST' => "conf-viewer.yoursite.com",
  71. 'PATH' => "/var/www/www-conf-viewer",
  72. 'NGINX_CONF_PATH' => "/etc/nginx/nginx.conf",
  73. 'NGINX_SERVER_CONF_PATH' => "/etc/nginx/conf.d/yoursite.com.conf",
  74. 'PHPFPM_CONF_PATH' => "/etc/php-fpm.conf",
  75. 'EXAMPLE_PATH' => "/var/www/www-conf-viewer/CONFVW_examples",
  76. 'LICENSE' => <<<LICENSETEXT
  77. Copyright (c) 2016, 2024, 5 Mode
  78. All rights reserved.
  79. This file is part of www-conf-viewer.
  80. www-conf-viewer is free software: you can redistribute it and/or modify
  81. it under the terms of the GNU General Public License as published by
  82. the Free Software Foundation, either version 3 of the License, or
  83. (at your option) any later version.
  84. www-conf-viewer is distributed in the hope that it will be useful,
  85. but WITHOUT ANY WARRANTY; without even the implied warranty of
  86. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  87. GNU General Public License for more details.
  88. You should have received a copy of the GNU General Public License
  89. along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
  90. https://opensource.org/licenses/GPL-3.0
  91. LICENSETEXT
  92. ,
  93. 'DEF_LANG' => "en-US"
  94. ]
  95. ];
  96. $LOCALE = [
  97. 'it-IT' => [
  98. '/home.php' => [
  99. 'ping' => "pong",
  100. 'How-to: Manage your avatars in Avatar Free' => "How-to: Gestire i tuoi avatar in Avatar Free",
  101. 'CV' => "CV",
  102. 'Sample' => "Esempio",
  103. 'My Network' => "Network",
  104. 'Hello from 5 Mode' => "Ciao da 5 Mode",
  105. 'This is just an example of blog entry' => "Questo e' giusto un esempio di post nel blog",
  106. 'Go' => "Vai",
  107. 'Hash Me' => "Codificami",
  108. 'Some rights reserved' => "Alcuni diritti riservati"
  109. ],
  110. '/js/home-js.php' => [
  111. 'ping' => "pong",
  112. 'Please set your hash in the config file with this value' => "Puoi impostare il tuo hash nel file config con questo valore"
  113. ]
  114. ],
  115. 'zh-CN' => [
  116. '/home.php' => [
  117. 'ping' => "pong",
  118. 'How-to: Manage your avatars in Avatar Free' => "HOW-TO: 免费管理您的化身",
  119. 'CV' => "简历",
  120. 'Sample' => "样本",
  121. 'My Network' => "我的网络",
  122. 'Hello from 5 Mode' => "您好5 MODE",
  123. 'This is just an example of blog entry' => "这只是博客条目的一个例子",
  124. 'Go' => "去",
  125. 'Hash Me' => "哈希我",
  126. 'Some rights reserved' => "保留一些权利"
  127. ],
  128. '/js/home-js.php' => [
  129. 'ping' => "pong",
  130. 'Please set your hash in the config file with this value' => "请在配置文件中设置您的哈希"
  131. ]
  132. ]
  133. ];
  134. $NGINX_DIRECTIVES = [
  135. 'access_log' => "Sets the path, format, and configuration for a buffered log",
  136. 'accept_mutex' => "When enabled worker processes will accept new connections by turn.",
  137. 'aio' => "Enables or disables the use of asynchronous file I/O",
  138. 'client_body_timeout' => "Defines a timeout for reading client request body.",
  139. 'client_header_timeout' => "Defines a timeout for reading client request header.",
  140. 'default_type' => "Defines the default MIME type of a response.",
  141. 'directio' => "Enables the use of the O_DIRECT flag (FreeBSD, Linux), the F_NOCACHE flag (macOS), or the directio() function (Solaris), when reading files that are larger than or equal to the specified size.",
  142. 'error_log' => "Configures logging",
  143. 'events' => "Defines the configuration file context for the directives that affect connection processing.",
  144. 'gzip' => "Enables or disables compression of responses.",
  145. 'gzip_comp_level' => "Sets a gzip compression level of a response (1-9).",
  146. 'gzip_min_length' => "Sets the minimum length of a response that will be compressed.",
  147. 'gzip_types' => "Enables compression of responses for the specified MIME types",
  148. 'include' => "Includes another file, or files matching the specified mask",
  149. 'index' => "Defines files that will be used as an index.",
  150. 'keepalive_disable' => "Disables keep-alive connections with misbehaving browsers",
  151. 'keepalive_requests' => "Sets the maximum number of requests that can be served through one keep-alive connection. ",
  152. 'keepalive_timeout' => "Sets a timeout during which a keep-alive client connection will stay open on the server side. A zero value disables keep-alive client connections.",
  153. 'limit_conn' => "Sets the shared memory zone and the maximum allowed number of connections for a given key value.",
  154. 'limit_conn_zone' => "Sets parameters for a shared memory zone that will keep states for various keys",
  155. 'log_format' => "Specifies the log format.",
  156. 'open_file_cache' => "Configures a cache",
  157. 'open_file_cache_errors' => "Enables or disables caching of file lookup errors",
  158. 'open_file_cache_min_uses' => "Sets the minimum number of file accesses during the period configured",
  159. 'open_file_cache_valid' => "Sets a time after which open_file_cache elements should be validated.",
  160. 'output_buffers' => "Sets the number and size of the buffers used for reading a response from a disk.",
  161. 'pid' => "Defines a file that will store the process ID of the main process.",
  162. 'proxy_cache_methods' => "Cached requested methods",
  163. 'proxy_cache_path' => "Sets the path and other parameters of a cache. Cache data are stored in files",
  164. 'proxy_cache_valid' => "Sets caching time for different response codes",
  165. 'proxy_temp_path' => "Defines a directory for storing temporary files with data received from proxied servers.",
  166. 'reset_timedout_connection' => "Enables or disables resetting timed out connections and connections closed.",
  167. 'sendfile' => "Enables or disables the use of sendfile().",
  168. 'sendfile_max_chunk' => "Limits the amount of data that can be transferred in a single sendfile() call. Without the limit, one fast connection may seize the worker process entirely.",
  169. 'send_timeout' => "Send timeout set only between two successive write operations, not for the transmission of the whole response.",
  170. 'server_tokens' => "Enables or disables emitting nginx version on error pages and in the 'server' response header field.",
  171. 'tcp_nodelay' => "Enables or disables the use of the TCP_NODELAY option",
  172. 'tcp_nopush' => "Enables or disables the use of the TCP_NOPUSH socket option on FreeBSD or the TCP_CORK socket option on Linux.",
  173. 'types_hash_max_size' => "Sets the maximum size of the types hash tables.",
  174. 'client_max_body_size' => "Sets the maximum allowed size of the client request body.",
  175. 'use' => "Specifies the connection processing method to use.",
  176. 'user' => "Defines user and group credentials used by worker processes.",
  177. 'worker_connections' => "Defines the maximum number of simultaneous connections that can be opened by a worker process.",
  178. 'worker_processes' => "Defines the number of worker processes. When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it).",
  179. 'worker_rlimit_nofile' => "Defines the limit of the maximum number of open files for worker process. "
  180. ];