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/
| | |
| | | //* 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'); |
| | | |
| | |
| | | |
| | | $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"); |
| | |
| | | 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() |
| | |
| | | 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> |
| | |
| | | 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'); |
| | | |