Skip to content

Commit 9e356a0

Browse files
committed
Fixed php cgi configuration.
1 parent b5f091c commit 9e356a0

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

INSTALL_DEBIAN_4.0.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Then run the following to enable the Apache modules:
6868
a2enmod suexec
6969
a2enmod rewrite
7070
a2enmod ssl
71+
a2enmod actions
7172

7273
4) Install pure-ftpd and quota
7374

INSTALL_DEBIAN_LENNY.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2
8787

8888
# Then run the following to enable the Apache modules suexec, rewrite and ssl:
8989

90-
a2enmod suexec rewrite ssl
90+
a2enmod suexec rewrite ssl actions
9191

9292
# Secure phpMyAdmin by deleting setuppassword-file
9393
# and removing/commenting Setup Authorization from apache.conf

INSTALL_OPENSUSE_11.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Then run the following to enable the Apache modules:
8080
a2enmod suexec
8181
a2enmod rewrite
8282
a2enmod ssl
83+
a2enmod actions
8384

8485
chkconfig --add apache2
8586
/etc/init.d/apache2 start

INSTALL_UBUNTU_8.04.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ a2enmod suexec
4545
a2enmod rewrite
4646
a2enmod ssl
4747
a2enmod include
48+
a2enmod actions
4849

4950

5051
3.1) Optional: Install SuPHP

server/conf/vhost.conf.master

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
<tmpl_if name='php' op='==' value='mod'>
5252
# mod_php enabled
5353
AddType application/x-httpd-php .php .php3 .php4 .php5
54+
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
55+
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
56+
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
57+
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
5458
</tmpl_if>
5559
<tmpl_if name='php' op='==' value='suphp'>
5660
# suphp enabled
@@ -63,7 +67,9 @@
6367
</tmpl_if>
6468
<tmpl_if name='php' op='==' value='cgi'>
6569
# php as cgi enabled
66-
AddType application/x-httpd-php .php .php3 .php4 .php5
70+
ScriptAlias /php5-cgi /usr/bin/php5-cgi
71+
Action php5-cgi /php5-cgi
72+
AddHandler php5-cgi .php .php3 .php4 .php5
6773
</tmpl_if>
6874
<tmpl_if name='php' op='==' value='fast-cgi'>
6975
# php as fast-cgi enabled
@@ -84,13 +90,6 @@
8490
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
8591
</tmpl_loop>
8692
</tmpl_if>
87-
<tmpl_if name='php' op='!=' value=''>
88-
89-
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
90-
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
91-
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
92-
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
93-
</tmpl_if>
9493

9594
<tmpl_var name='apache_directives'>
9695
</VirtualHost>
@@ -153,6 +152,10 @@
153152
<tmpl_if name='php' op='==' value='mod'>
154153
# mod_php enabled
155154
AddType application/x-httpd-php .php .php3 .php4 .php5
155+
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
156+
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
157+
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
158+
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
156159
</tmpl_if>
157160
<tmpl_if name='php' op='==' value='suphp'>
158161
# suphp enabled
@@ -163,7 +166,9 @@
163166
</tmpl_if>
164167
<tmpl_if name='php' op='==' value='cgi'>
165168
# php as cgi enabled
166-
AddType application/x-httpd-php .php .php3 .php4 .php5
169+
ScriptAlias /php5-cgi /usr/bin/php5-cgi
170+
Action php5-cgi /php5-cgi
171+
AddHandler php5-cgi .php .php3 .php4 .php5
167172
</tmpl_if>
168173
<tmpl_if name='php' op='==' value='fast-cgi'>
169174
# php as fast-cgi enabled
@@ -185,13 +190,6 @@
185190
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
186191
</tmpl_loop>
187192
</tmpl_if>
188-
<tmpl_if name='php' op='!=' value=''>
189-
190-
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
191-
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
192-
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
193-
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
194-
</tmpl_if>
195193

196194
<tmpl_var name='apache_directives'>
197195
</VirtualHost>

0 commit comments

Comments
 (0)