[svn-inject] Applying Debian modifications to trunk
[manu/suphp.git] / doc / en / INSTALL
1 ===========================
2 == suPHP                 ==
3 ===========================
4
5 Installation
6 ------------
7
8 1. Introduction
9
10 The suPHP Apache module together with suPHP itself provides an easy way to
11 run PHP scripts with different users on the same server.
12
13 It provides security, because the PHP scripts are not run with the rights of
14 the webserver's user.
15 In addition to that you probably won't have to use PHP's "safe mode", which
16 applies many restrictions on the scripts.
17
18 Please note that the suPHP binary has to be installed setuid-root to work,
19 so a security bug in suPHP probably will allow atackers to run commands with
20 root privileges. Although I currently don't know any bug in suPHP I can't
21 guarantee that there aren't any.
22
23 2. Installation
24
25 Run ./configure with the appropriate paramters for your system.
26
27 On most systems a
28  ./configure --prefix=/usr
29 will suffice.
30
31 The configure script can take the familar GNU autoconf arguments plus the
32 following suPHP specific ones:
33
34 --disable-checkpath: With this compile time option suPHP does not check,
35                      whether a script (or a symink to it)is inside the
36                      DOCUMENT_ROOT. You may want to activate this option
37                      if you are working with "Alias"-directives.
38
39 --disable-checkuid:  You may specify this option to make suPHP work with
40                      scripts whose UIDs are not listed in /etc/passwd.
41
42 --disable-checkgid:  You may specify this option to make suPHP work with 
43                      scripts whose GIDs are not listed in /etc/group.
44
45 --with-apxs=FILE:    Path to "apxs" of your Apache installation. If not
46                      specified, configure will look for apxs in your PATH.
47                      Without apxs the Apache module mod_suphp will not be
48                      built. It will not be built either, if your Apache has
49                      been compiled without DSO support. Please make sure you
50                      specify the right path to apxs, because suPHP will use
51                      apxs to check whether to build mod_suphp for Apache 1
52                      or Apache 2.
53
54 --with-min-uid=UID:  The minium UID that suPHP will allow PHP to run scripts 
55                      with (defaults to 100).
56
57 --with-min-gid=GID:  The minium GID that suPHP will allow PHP to run scripts
58                      with (defaults to 100).
59
60 --with-apache-user=USERNAME:
61                      Username (not UID) Apache is running as (defaults to
62                      wwwrun).
63
64 --with-php=FILE:     Path to PHP interpreter "php" (defaults to
65                      /usr/bin/php).
66
67 --with-logfile=FILE  Path to the suPHP logfile (defaults to
68                      /var/log/httpd/suphp_log).
69                      
70 --with-setid-mode=MODE:
71                      MODE has to be one of:
72                      "owner":    Run scripts with owner UID/GID
73                      "force":    Run scripts with UID/GID specified in Apache 
74                                  configuration (only supported when using Apache 2)
75                      "paranoid": Run scripts with owner UID/GID but also check
76                                  if they match the UID/GID specified in the
77                                  Apache configuration
78
79 Now compile suPHP using "make" and if no error occured install it using
80 "make install". Be sure to be root, when you try to install it.
81
82 If your Apache is running with DSO support and "apxs" was found during the
83 build process, you are done. Otherwise you have to rebuilt your Apache
84 server with "mod_suphp.c" included. If you used another prefix during the
85 suPHP build than "/usr", you have to modify "mod_suphp.c" to set the path to
86 the suPHP executable (which you can find in $exec_prefix/sbin/suphp).
87
88 Details on how to compile your Apache webserver with mod_suphp can be found
89 in apache/INSTALL.
90
91 Now, the only thing you have to do, is to modify your "httpd.conf" to
92 activate suPHP for specific VHosts. See apache/CONFIG for details on this.
93
94
95 ===================================
96 (c)2002-2004 by Sebastian Marsching
97 <sebastian@marsching.com>
98 Please see LICENSE for
99 additional information