]> git.p6c8.net - jirafeau.git/blob - lib/config.original.php
[FEATURE] Docs: Enhance readabilty of config params
[jirafeau.git] / lib / config.original.php
1 <?php
2 /*
3 * Jirafeau, your web file repository
4 * Copyright (C) 2008 Julien "axolotl" BERNARD <axolotl@magieeternelle.org>
5 * Copyright (C) 2015 Jerome Jutteau <j.jutteau@gmail.com>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
11 *
12 * This program 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 Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21 /**
22 * Default configuration
23 *
24 * To overwrite these settings copy the file,
25 * rename it to »config.local.php« and adapt the parameters.
26 **/
27 global $cfg;
28
29 /* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«)
30 */
31 $cfg['web_root'] = '';
32
33 /* Path to data directory, with trailing slash (eg. »/var/www/data/var_314159265358979323846264«
34 */
35 $cfg['var_root'] = '';
36
37 /* Language - choice between 'auto' or any language located in the /lib/locales/ folder.
38 * The mode »auto« will cause the script to detect the user's browser information
39 * and offer a matching language, and use »en« if it is not available.
40 */
41 $cfg['lang'] = 'auto';
42
43 /* Select a theme - see media folder for available themes
44 */
45 $cfg['style'] = 'courgette';
46
47 /* Propose a preview link if file type is previewable
48 */
49 $cfg['preview'] = true;
50
51 /* Enable the encryption feature
52 * By enabling it, file-level deduplication won't work anymore. See FAQ.
53 */
54 $cfg['enable_crypt'] = false;
55
56 /* Length of link reference
57 */
58 $cfg['link_name_length'] = 8;
59
60 /* Upload password(s).
61 * An empty array will disable the password authentification.
62 * $cfg['upload_password'] = array(); // No password
63 * $cfg['upload_password'] = array('psw1'); // One password
64 * $cfg['upload_password'] = array('psw1', 'psw2'); // Two passwords
65 */
66 $cfg['upload_password'] = array();
67
68 /* List of IP allowed to upload a file.
69 * If the list is empty, then there is no upload restriction based on IP.
70 * Elements of the list can be a single IP (e.g. "123.45.67.89") or
71 * an IP range (e.g. "123.45.0.0/16").
72 * Note that CIDR notation is available for IPv4 only for the moment.
73 */
74 $cfg['upload_ip'] = array();
75
76 /* Password for the admin interface.
77 * An empty password will disable the password authentification.
78 * The password is a sha256 hash of the original version.
79 */
80 $cfg['admin_password'] = '';
81
82 /* If set, let the user be authenticated as administrator.
83 * The user provided here is the user authenticated by HTTP authentication.
84 * Note that Jirafeau does not manage the HTTP login part, it just checks
85 * that the provided user is logged in.
86 * If »admin_password« parameter is set, then the »admin_password« is ignored.
87 */
88 $cfg['admin_http_auth_user'] = '';
89
90 /* Allow user to select different options for file expiration time.
91 * Possible values in array:
92 * 'minute': file is available for one minute
93 * 'hour': file available for one hour
94 * 'day': file available for one day
95 * 'week': file available for one week
96 * 'month': file is available for one month
97 * 'quarter': file is available for three month
98 * 'year': file available for one year
99 * 'none': unlimited availability
100 */
101 $cfg['availabilities'] = array (
102 'minute' => true,
103 'hour' => true,
104 'day' => true,
105 'week' => true,
106 'month' => true,
107 'quarter' => false,
108 'year' => false,
109 'none' => false
110 );
111
112 /* Set a default value for the expiration time.
113 * The value has to equal one of the enabled options in »availabilities«, e.g. »month«.
114 */
115 $cfg['availability_default'] = 'month';
116
117 /* Set maximal upload size expressed in MB.
118 * »0« means unlimited upload size.
119 */
120 $cfg['maximal_upload_size'] = 0;
121
122 /* Proxy IP
123 * If the installation is behind some reverse proxies, it is possible to set
124 * the allowed proxy IP.
125 * $cfg['proxy_ip'] = array('12.34.56.78');
126 * Jirafeau will then get a visitor's IP from HTTP_X_FORWARDED_FOR
127 * instead of REMOTE_ADDR.
128 */
129 $cfg['proxy_ip'] = array();
130
131 /* Required flag to test if the installation is already installed
132 * or needs to start the installation script
133 */
134 $cfg['installation_done'] = false;
135
136 /* Try to include user's local configuration. */
137 if ((basename (__FILE__) != 'config.local.php')
138 && file_exists (JIRAFEAU_ROOT.'lib/config.local.php'))
139 {
140 require (JIRAFEAU_ROOT.'lib/config.local.php');
141 }
142
143 ?>

patrick-canterino.de