changed var-names for ownerrordocs option
added www.-Subdomain option
| | |
| | | `cgi` char(1) NOT NULL default 'y', |
| | | `ssi` char(1) NOT NULL default 'y', |
| | | `suexec` char(1) NOT NULL default 'y', |
| | | `errordocs` char(1) NOT NULL default 'y', |
| | | `is_errordocs` tinyint(1) NOT NULL default '1', |
| | | `is_subdomainwww` tinyint(1) NOT NULL default '1', |
| | | `php` varchar(255) NOT NULL default 'y', |
| | | `redirect_type` varchar(255) default NULL, |
| | | `redirect_path` varchar(255) default NULL, |
| | |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | 'errordocs' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'is_errordocs' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | 'default' => '1', |
| | | 'value' => array(0 => '0',1 => '1') |
| | | ), |
| | | 'is_subdomainwww' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '1', |
| | | 'value' => array(0 => '0',1 => '1') |
| | | ), |
| | | 'ssl' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | $wb["traffic_quota_txt"] = 'Traffic Quota'; |
| | | $wb["cgi_txt"] = 'CGI'; |
| | | $wb["ssi_txt"] = 'SSI'; |
| | | $wb["errordocs_txt"] = 'Own Error-Documents'; |
| | | $wb["is_errordocs_txt"] = 'Own Error-Documents'; |
| | | $wb["is_subdomainwww_txt"] = 'www. Subdomain'; |
| | | $wb["ssl_txt"] = 'SSL'; |
| | | $wb["suexec_txt"] = 'SuEXEC'; |
| | | $wb["php_txt"] = 'PHP'; |
| | |
| | | <span class="">{tmpl_var name='suexec'}</span>
|
| | | </span>
|
| | | <span class="wf_oneField">
|
| | | <label for="errordocs" class="wf_preField">{tmpl_var name='errordocs_txt'}</label> |
| | | <span class="">{tmpl_var name='errordocs'}</span>
|
| | | <label for="is_errordocs" class="wf_preField">{tmpl_var name='is_errordocs_txt'}</label> |
| | | <span class="">{tmpl_var name='is_errordocs'}</span>
|
| | | </span>
|
| | | <span class="wf_oneField">
|
| | | <label for="is_subdomainwww" class="wf_preField">{tmpl_var name='is_subdomainwww_txt'}</label> |
| | | <span class="">{tmpl_var name='is_subdomainwww'}</span>
|
| | | </span>
|
| | | <span class="wf_oneField">
|
| | | <label for="ssl" class="wf_preField">{tmpl_var name='ssl_txt'}</label>
|
| | |
| | | ServerAdmin webmaster@<tmpl_var name='domain'> |
| | | |
| | | ErrorLog <tmpl_var name='document_root'>/log/error.log |
| | | <tmpl_if name='errordocs' op='==' value='y'> |
| | | <tmpl_if name='is_errordocs'> |
| | | |
| | | ErrorDocument 400 /error/invalidSyntax.html |
| | | ErrorDocument 401 /error/authorizationRequired.html |
| | |
| | | <tmpl_if name='php' op='!=' value=''> |
| | | |
| | | php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
| | | php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| | | php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| | | #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
| | | #php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| | | #php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| | | </tmpl_if> |
| | | <tmpl_var name='apache_directives'> |
| | | </VirtualHost> |
| | |
| | | |
| | | ErrorLog <tmpl_var name='document_root'>/log/error.log |
| | | |
| | | <tmpl_if name='errordocs' op='==' value='y'> |
| | | <tmpl_if name='is_errordocs'> |
| | | ErrorDocument 400 /error/invalidSyntax.html |
| | | ErrorDocument 401 /error/authorizationRequired.html |
| | | ErrorDocument 403 /error/forbidden.html |
| | |
| | | <tmpl_if name='php' op='!=' value=''> |
| | | |
| | | php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
| | | php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| | | php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| | | #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
| | | #php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| | | #php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| | | </tmpl_if> |
| | | |
| | | <tmpl_var name='apache_directives'> |
| | |
| | | |
| | | // Check if the directories are there and create them if nescessary. |
| | | if(!is_dir($data["new"]["document_root"]."/web")) exec("mkdir -p ".$data["new"]["document_root"]."/web"); |
| | | if(!is_dir($data["new"]["document_root"]."/web/error")) exec("mkdir -p ".$data["new"]["document_root"]."/web/error"); |
| | | if(!is_dir($data["new"]["document_root"]."/web/error") and $data["new"]["is_errordocs"]) exec("mkdir -p ".$data["new"]["document_root"]."/web/error"); |
| | | //if(!is_dir($data["new"]["document_root"]."/log")) exec("mkdir -p ".$data["new"]["document_root"]."/log"); |
| | | if(!is_dir($data["new"]["document_root"]."/ssl")) exec("mkdir -p ".$data["new"]["document_root"]."/ssl"); |
| | | if(!is_dir($data["new"]["document_root"]."/cgi-bin")) exec("mkdir -p ".$data["new"]["document_root"]."/cgi-bin"); |
| | | if(!is_dir($data["new"]["document_root"]."/tmp")) exec("mkdir -p ".$data["new"]["document_root"]."/tmp"); |
| | | |
| | | // Remove the symlink for the site, if site is renamed |
| | | if($this->action == 'update' && $data["old"]["domain"] != '' && $data["new"]["domain"] != $data["old"]["domain"]) { |
| | |
| | | |
| | | if($this->action == 'insert' && $data["new"]["type"] == 'vhost') { |
| | | // Copy the error pages |
| | | if($data["new"]["is_errordocs"]){ |
| | | $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); |
| | | exec("chmod -R +r ".$error_page_path); |
| | | } |
| | | |
| | | // copy the standard index page |
| | | exec("cp /usr/local/ispconfig/server/conf/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html"); |
| | |
| | | |
| | | // get alias domains (co-domains and subdomains) |
| | | $aliases = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$data["new"]["domain_id"]." AND active = 'y'"); |
| | | if($data["new"]["is_subdomainwww"]){ |
| | | $server_alias .= 'www.'.$data["new"]["domain"].' '; |
| | | } else { |
| | | $server_alias = ''; |
| | | } |
| | | if(is_array($aliases)) { |
| | | foreach($aliases as $alias) { |
| | | $server_alias .= $alias["domain"].' '; |