tbrehm
2009-03-05 0f76ebb7208bd65a93c31c530a36c5a96c372cc8
install/dist/lib/fedora.lib.php
@@ -404,6 +404,11 @@
    {   
      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');
      
@@ -413,9 +418,18 @@
      
      $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");
      }
      
   }
   
@@ -667,7 +681,6 @@
        
        
        // 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);
      
@@ -694,6 +707,8 @@
         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");