0.6.0-1 release
[manu/suphp.git] / doc / CONFIG
1 ===========================
2 == suPHP                 ==
3 ===========================
4
5 Configuration
6 -------------
7
8 1. General notes
9
10 The suPHP configuration file resides in $sysconfdir/suphp.conf (which will
11 resolve e.g. to /etc/suphp.conf).
12
13 It has the usual "INI-file" syntax.
14
15 Section names are encapsulated in square brackets (e.g. [global]).
16 Configuration options are key value pairs, separated by a "=" sign (e.g.
17 umask=0077).
18
19 Comment lines start with a ";".
20
21 You can find a sample configuration in suphp.conf-example
22
23
24 2. Global options
25
26 This options have to be specified in the [global] section.
27 All this options are facultative.
28
29 logfile:
30   Specifies path to logfile. If not specified, the compile-time value is
31   used.
32
33 loglevel:
34   One of "info", "warn", "error", "none".
35   Specifies messages of which classification should be logged.
36   Defaults to "info".
37
38 webserver_user:
39   Username of UID webserver is running as. If not specified, the
40   compile-time value is used.
41
42 docroot:
43   Path all scripts have to reside in. This is an additional security check,
44   especially when check_vhost_docroot is disabled. Defaults to / thus
45   allowing scripts in any location being run.
46
47 allow_file_group_writeable:
48   Allow files to be group writeable. Is disabled by default.
49
50 allow_directory_group_writeable:
51   Allow directories scripts are residing in to be group writeable.
52   Is disabled by default.
53
54 allow_file_others_writeable:
55   Allow files to be writeable by world. Is disabled by default:
56   WARNING: Enabling this option is very dangerous and causes major
57   security issues, especially the danger of arbitrary code execution!
58
59 allow_directoy_others_writeable:
60   Allow directories scripts are residing in to be writeable by world.
61   Is disabled by default:
62   WARNING: Enabling this option is dangerous!
63
64 check_vhost_docroot:
65   Checks wheter the script is within DOCUMENT_ROOT specified by the 
66   webserver. This option is intended to avoid symbol links outside of the
67   webpage directory. You may want to disable it, when you are using
68   mod_vhost_alias or the Alias-directive.
69   This option is disabled by default, if at compile-time the
70   "--disable-check-docroot" option has been specified, otherwise it is
71   enabled by default.
72
73 errors_to_browser:
74   Enable this option to sent information about minor problems during script
75   invocation to the browser. This option is disabled by default.
76
77 env_path:
78   Content of the "PATH" environment variable. Set this to a secure value.
79   The default value is "/bin:/usr/bin".
80
81 umask:
82   umask to set before script execution.
83   Has to be specified in octal notation (e.g. 0077).
84
85 min_uid:
86   Minimum UID allowed to execute scripts.
87   Defaults to compile-time value.
88
89 min_gid:
90   Minimum GID allowed to execute scripts.
91   Defaults to compile-time value.
92
93
94 3. Handlers
95
96 In the [handlers] section you specify a mapping between mime-types and
97 interpreters to be used.
98
99 Example:
100 x-httpd-php=php:/usr/bin/php
101
102 The "key" is the mime-type. The "value" consists of to parts seperated by a
103 colon.
104
105 The first part is the "mode". The second part is the path to the
106 interpreter.
107
108 At the moment two modes are supported:
109
110 "php"-mode: Use this mode for PHP scripts. Specify the PHP-interpreter you
111   want to use.
112
113 "execute"-mode: Must be specified as "execute:!self". Does not take any
114   interpreter as the script itself is executed. Use this option for
115   CGI-scripts.
116
117 ===================================
118 (c)2002-2005 by Sebastian Marsching
119 <sebastian@marsching.com>
120 Please see LICENSE for
121 additional information