| | |
| | | { |
| | | global $conf; |
| | | |
| | | if(is_file('/etc/suphp.conf')) { |
| | | //replaceLine('/etc/suphp.conf','php=php:/usr/bin','x-httpd-suphp=php:/usr/bin/php-cgi',0); |
| | | replaceLine('/etc/suphp.conf','docroot=','docroot=/var/www',0); |
| | | } |
| | | |
| | | //* Create the logging directory for the vhost logfiles |
| | | exec('mkdir -p /var/log/ispconfig/httpd'); |
| | | |
| | |
| | | |
| | | $content = rf('/etc/httpd/conf/httpd.conf'); |
| | | if(!stristr($content,'Include /etc/httpd/conf/sites-enabled/')) { |
| | | af('/etc/httpd/conf/httpd.conf',"\nInclude /etc/httpd/conf/sites-enabled/\n\n"); |
| | | af('/etc/httpd/conf/httpd.conf',"\nNameVirtualHost *:80\nNameVirtualHost *:443\nInclude /etc/httpd/conf/sites-enabled/\n\n"); |
| | | } |
| | | unset($content); |
| | | |
| | | //* Copy the ISPConfig configuration include |
| | | $vhost_conf_dir = $conf['apache']['vhost_conf_dir']; |
| | | $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir']; |
| | | |
| | | copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf'); |
| | | if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) { |
| | | exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf"); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | // Dont just copy over the virtualhost template but add some custom settings |
| | | |
| | | $content = rf("tpl/apache_ispconfig.vhost.master"); |
| | | $content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content); |
| | | |
| | |
| | | exec('ln -s /usr/local/ispconfig/interface/web /var/www/ispconfig'); |
| | | exec('chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig'); |
| | | |
| | | replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0); |
| | | |
| | | } |
| | | |
| | | //copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost"); |