mcramer
2013-07-09 cea0c451275b606ca842d522624e658e3cff864e
server/plugins-available/nginx_plugin.inc.php
@@ -243,6 +243,7 @@
         if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file,$data["new"]["ssl_cert"]);
         //if(trim($data["new"]["ssl_bundle"]) != '') $app->system->file_put_contents($bundle_file,$data["new"]["ssl_bundle"]);
         if(trim($data["new"]["ssl_key"]) != '') $app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]);
         $app->system->chmod($key_file2,0400);
         
         // for nginx, bundle files have to be appended to the certificate file
         if(trim($data["new"]["ssl_bundle"]) != ''){            
@@ -2400,6 +2401,12 @@
      if(is_array($lines) && !empty($lines)){
         $linecount = sizeof($lines);
         for($h=0;$h<$linecount;$h++){
            // remove comments
            if(substr(trim($lines[$h]),0,1) == '#'){
               unset($lines[$h]);
               continue;
            }
            $lines[$h] = rtrim($lines[$h]);
            /*
            if(substr(ltrim($lines[$h]), 0, 8) == 'location' && strpos($lines[$h], '{') !== false && strpos($lines[$h], ';') !== false){