Skip to content

Commit a014c2c

Browse files
author
daniel
committed
Updated installer to not ask for fastcgi support.
Added fastcgi support by default into the ISPConfig vhost. Copies over the fastcgi starter script into /usr/local/ispconfig/interface/bin/
1 parent 6a95c89 commit a014c2c

File tree

4 files changed

+20
-32
lines changed

4 files changed

+20
-32
lines changed

install/install.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,6 @@
175175
//* Configure ISPConfig
176176
swriteln('Installing ISPConfig');
177177

178-
//** We want to check if the server is a module or cgi based php enabled server
179-
//** TODO: Don't always ask for this somehow ?
180-
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
181-
182-
if($fast_cgi == 'yes') {
183-
$alias = $inst->free_query('Script Alias', '/php/');
184-
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
185-
$inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
186-
} else {
187-
$inst->conf['apache']['vhost_cgi_alias'] = "";
188-
}
189-
190-
191178
//** Customise the port ISPConfig runs on
192179
$inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
193180

install/lib/installer_base.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,6 @@ public function install_ispconfig()
697697

698698
$content = rf("tpl/apache_ispconfig.vhost.master");
699699
$content = str_replace('{vhost_port}', $this->conf['apache']['vhost_port'], $content);
700-
$content = str_replace('{vhost_cgi_alias}', $this->conf['apache']['vhost_cgi_alias'], $content);
701-
702700
wf("$vhost_conf_dir/ispconfig.vhost", $content);
703701

704702
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
@@ -716,6 +714,8 @@ public function install_ispconfig()
716714
exec('chown root /usr/local/bin/ispconfig_update_from_svn.sh');
717715
exec('chmod 700 /usr/local/bin/ispconfig_update_from_svn.sh');
718716

717+
//set the fast cgi starter script to executable
718+
exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
719719
}
720720

721721
public function install_crontab()

install/tpl/apache_ispconfig.vhost.master

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,24 @@ NameVirtualHost *:{vhost_port}
1111
ServerAdmin webmaster@localhost
1212
DocumentRoot /usr/local/ispconfig/interface/web/
1313

14-
{vhost_cgi_alias}
14+
<IfModule mod_fastcgi.c>
15+
<Location /php/php-fcgi>
16+
Options ExecCGI
17+
SetHandler fastcgi-script
18+
</Location>
19+
20+
Action php-fastcgi /php/php-fcgi
21+
22+
ScriptAlias /php/ /usr/local/ispconfig/interface/bin/
23+
24+
<Directory "/usr/local/ispconfig/interface/bin/">
25+
AllowOverride None
26+
Options +ExecCGI -MultiViews -Indexes
27+
Order allow,deny
28+
Allow from all
29+
</Directory>
30+
</IfModule>
31+
1532
<IfModule mod_php5.c>
1633
AddType application/x-httpd-php .php
1734
</IfModule>

install/update.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,22 +176,6 @@
176176
swriteln('Updating ISPConfig');
177177

178178

179-
//** We want to check if the server is a module or cgi based php enabled server
180-
//** TODO: Don't always ask for this somehow ?
181-
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
182-
183-
184-
if($fast_cgi == 'yes') {
185-
$alias = $inst->free_query('Script Alias', '/php/');
186-
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
187-
$inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
188-
$inst->conf['apache']['vhost_cgi_alias_path'] = $path;
189-
} else {
190-
$inst->conf['apache']['vhost_cgi_alias'] = "";
191-
$inst->conf['apache']['vhost_cgi_alias_path'] = "";
192-
}
193-
194-
195179
//** Customise the port ISPConfig runs on
196180
$inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
197181

0 commit comments

Comments
 (0)