| | |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$parent_domain_id." AND active = 'y'"); |
| | | $data["new"] = $tmp; |
| | | $data["old"] = $tmp; |
| | | $this->action = 'update'; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | if($this->action == 'insert') { |
| | | if($this->action == 'insert' && $data["new"]["type"] == 'vhost') { |
| | | // Copy the error pages |
| | | $error_page_path = escapeshellcmd($data["new"]["document_root"])."/web/error/"; |
| | | exec("cp /usr/local/ispconfig/server/conf/error/".substr(escapeshellcmd($conf["language"]),0,2)."/* ".$error_page_path); |
| | |
| | | |
| | | $vhost_data = $data["new"]; |
| | | $vhost_data["web_document_root"] = $data["new"]["document_root"]."/web"; |
| | | $vhost_data["web_document_root_www"] = "/var/www/".$data["new"]["domain"]."/web"; |
| | | |
| | | // Check if a SSL cert exists |
| | | $ssl_dir = $data["new"]["document_root"]."/ssl"; |
| | |
| | | |
| | | $tpl->setVar('fastcgi_alias',$fastcgi_config["fastcgi_alias"]); |
| | | $tpl->setVar('fastcgi_starter_path',$fastcgi_starter_path); |
| | | $tpl->setVar('fastcgi_starter_script',$fastcgi_config["fastcgi_starter_script"]); |
| | | |
| | | } |
| | | |