Commit a014c2c4 authored by daniel's avatar daniel
Browse files

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/
parent 6a95c89e
......@@ -175,19 +175,6 @@ if($install_mode == 'Standard') {
//* Configure ISPConfig
swriteln('Installing ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
//** TODO: Don't always ask for this somehow ?
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
if($fast_cgi == 'yes') {
$alias = $inst->free_query('Script Alias', '/php/');
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
$inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
} else {
$inst->conf['apache']['vhost_cgi_alias'] = "";
}
//** Customise the port ISPConfig runs on
$inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
......
......@@ -697,8 +697,6 @@ class installer_base {
$content = rf("tpl/apache_ispconfig.vhost.master");
$content = str_replace('{vhost_port}', $this->conf['apache']['vhost_port'], $content);
$content = str_replace('{vhost_cgi_alias}', $this->conf['apache']['vhost_cgi_alias'], $content);
wf("$vhost_conf_dir/ispconfig.vhost", $content);
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
......@@ -716,6 +714,8 @@ class installer_base {
exec('chown root /usr/local/bin/ispconfig_update_from_svn.sh');
exec('chmod 700 /usr/local/bin/ispconfig_update_from_svn.sh');
//set the fast cgi starter script to executable
exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
}
public function install_crontab()
......
......@@ -11,7 +11,24 @@ NameVirtualHost *:{vhost_port}
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/ispconfig/interface/web/
{vhost_cgi_alias}
<IfModule mod_fastcgi.c>
<Location /php/php-fcgi>
Options ExecCGI
SetHandler fastcgi-script
</Location>
Action php-fastcgi /php/php-fcgi
ScriptAlias /php/ /usr/local/ispconfig/interface/bin/
<Directory "/usr/local/ispconfig/interface/bin/">
AllowOverride None
Options +ExecCGI -MultiViews -Indexes
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
</IfModule>
......
......@@ -176,22 +176,6 @@ if($reconfigure_services_answer == 'yes') {
swriteln('Updating ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
//** TODO: Don't always ask for this somehow ?
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
if($fast_cgi == 'yes') {
$alias = $inst->free_query('Script Alias', '/php/');
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
$inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
$inst->conf['apache']['vhost_cgi_alias_path'] = $path;
} else {
$inst->conf['apache']['vhost_cgi_alias'] = "";
$inst->conf['apache']['vhost_cgi_alias_path'] = "";
}
//** Customise the port ISPConfig runs on
$inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment