0.6.1-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 chroot:
48   Path to change the process's root directory to before executing the
49   script. Has to be specified without a trailing slash.
50   If not specified, no chroot() call is performed.
51
52 allow_file_group_writeable:
53   Allow files to be group writeable. Is disabled by default.
54
55 allow_directory_group_writeable:
56   Allow directories scripts are residing in to be group writeable.
57   Is disabled by default.
58
59 allow_file_others_writeable:
60   Allow files to be writeable by world. Is disabled by default:
61   WARNING: Enabling this option is very dangerous and causes major
62   security issues, especially the danger of arbitrary code execution!
63
64 allow_directoy_others_writeable:
65   Allow directories scripts are residing in to be writeable by world.
66   Is disabled by default:
67   WARNING: Enabling this option is dangerous!
68
69 check_vhost_docroot:
70   Checks wheter the script is within DOCUMENT_ROOT specified by the 
71   webserver. This option is intended to avoid symbol links outside of the
72   webpage directory. You may want to disable it, when you are using
73   mod_vhost_alias or the Alias-directive.
74   This option is disabled by default, if at compile-time the
75   "--disable-check-docroot" option has been specified, otherwise it is
76   enabled by default.
77
78 errors_to_browser:
79   Enable this option to sent information about minor problems during script
80   invocation to the browser. This option is disabled by default.
81
82 env_path:
83   Content of the "PATH" environment variable. Set this to a secure value.
84   The default value is "/bin:/usr/bin".
85
86 umask:
87   umask to set before script execution.
88   Has to be specified in octal notation (e.g. 0077).
89
90 min_uid:
91   Minimum UID allowed to execute scripts.
92   Defaults to compile-time value.
93
94 min_gid:
95   Minimum GID allowed to execute scripts.
96   Defaults to compile-time value.
97
98
99 3. Handlers
100
101 In the [handlers] section you specify a mapping between mime-types and
102 interpreters to be used.
103
104 Example:
105 x-httpd-php=php:/usr/bin/php
106
107 The "key" is the mime-type. The "value" consists of to parts seperated by a
108 colon.
109
110 The first part is the "mode". The second part is the path to the
111 interpreter.
112
113 At the moment two modes are supported:
114
115 "php"-mode: Use this mode for PHP scripts. Specify the PHP-interpreter you
116   want to use.
117
118 "execute"-mode: Must be specified as "execute:!self". Does not take any
119   interpreter as the script itself is executed. Use this option for
120   CGI-scripts.
121
122 ===================================
123 (c)2002-2005 by Sebastian Marsching
124 <sebastian@marsching.com>
125 Please see LICENSE for
126 additional information