tbrehm
2010-11-02 604b53c512426c91a415edaf2b2e34fa2cf71ad6
server/plugins-available/apache2_plugin.inc.php
@@ -161,8 +161,8 @@
         $csr_file = $ssl_dir.'/'.$domain.".csr";
         $crt_file = $ssl_dir.'/'.$domain.".crt";
         $bundle_file = $ssl_dir.'/'.$domain.".bundle";
         file_put_contents($csr_file,$data["new"]["ssl_request"]);
         file_put_contents($crt_file,$data["new"]["ssl_cert"]);
         if(trim($data["new"]["ssl_request"]) != '') file_put_contents($csr_file,$data["new"]["ssl_request"]);
         if(trim($data["new"]["ssl_cert"]) != '') file_put_contents($crt_file,$data["new"]["ssl_cert"]);
         if(trim($data["new"]["ssl_bundle"]) != '') file_put_contents($bundle_file,$data["new"]["ssl_bundle"]);
         /* Update the DB of the (local) Server */
         $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data["new"]["domain"]."'");
@@ -553,7 +553,11 @@
         if($data["new"]['php'] == 'mod') {
            $master_php_ini_path = $web_config['php_ini_path_apache'];
         } else {
            $master_php_ini_path = $web_config['php_ini_path_cgi'];
            if($data["new"]['php'] == 'fast-cgi' && file_exists($fastcgi_config["fastcgi_phpini_path"])) {
               $master_php_ini_path = $fastcgi_config["fastcgi_phpini_path"];
            } else {
               $master_php_ini_path = $web_config['php_ini_path_cgi'];
            }
         }
         if($master_php_ini_path != '' && substr($master_php_ini_path,-7) == 'php.ini' && is_file($master_php_ini_path)) {
            $php_ini_content .= file_get_contents($master_php_ini_path)."\n";
@@ -911,7 +915,7 @@
      }
      
      // Remove the backup copy of the config file.
      unlink($vhost_file.'~');
      if(@is_file($vhost_file.'~')) unlink($vhost_file.'~');
      
      //* Unset action to clean it for next processed vhost.
@@ -927,7 +931,7 @@
      $web_config = $app->getconf->get_server_config($conf["server_id"], 'web');
      //* Check if this is a chrooted setup
      if($web_config['website_basedir'] != '' && @is_file($web_config['/var/www'].'/etc/passwd')) {
      if($web_config['website_basedir'] != '' && @is_file($web_config['website_basedir'].'/etc/passwd')) {
         $apache_chrooted = true;
      } else {
         $apache_chrooted = false;
@@ -1246,7 +1250,8 @@
            /*
             * add all the webdav-dirs to the webdav-section
            */
            $files = scandir($webdavRoot);
            $files = @scandir($webdavRoot);
            if(is_array($files)) {
            foreach($files as $file) {
               if (substr($file, strlen($file) - strlen('.htdigest')) == '.htdigest') {
                  /*
@@ -1254,8 +1259,8 @@
                  */
                  $fn = substr($file, 0, strlen($file) - strlen('.htdigest'));
                  $output .= "\n";
                  $output .= "      Alias /" . $fn . " " . $webdavRoot . "/" . $fn . "\n";
                  $output .= "      <Location /" . $fn . ">\n";
                  $output .= "      Alias /webdav/" . $fn . ' ' . $webdavRoot . '/' . $fn . "\n";
                  $output .= "      <Location /webdav/" . $fn . ">\n";
                  $output .= "        DAV On\n";
                  $output .= "        AuthType Digest\n";
                  $output .= "        AuthName \"" . $fn . "\"\n";
@@ -1267,6 +1272,7 @@
                  $output .= "      </Location> \n";
               }
            }
            }
         }
         /*
          *  is the "replace-comment-end" found...