Merge branch 'stable-3.1'
1 files added
45 files modified
| | |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | */ |
| | | |
| | | //* Configure Bind |
| | | if($conf['bind']['installed']) { |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | $conf['services']['dns'] = true; |
| | | if(!$inst->find_installed_apps('haveged')) { |
| | | if(!is_installed('haveged')) { |
| | | swriteln("[INFO] haveged not detected - DNSSEC can fail"); |
| | | } |
| | | } |
| | |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | $conf['services']['dns'] = true; |
| | | if(!$inst->find_installed_apps('haveged')) { |
| | | if(!is_installed('haveged')) { |
| | | swriteln("[INFO] haveged not detected - DNSSEC can fail"); |
| | | } |
| | | } |
New file |
| | |
| | | ALTER TABLE `directive_snippets` ADD `master_directive_snippets_id` int(11) unsigned NOT NULL DEFAULT '0' AFTER `active`; |
| | |
| | | |
| | | # SSL Configuration |
| | | <tmpl_var name="ssl_comment">SSLEngine On |
| | | <tmpl_if name='apache_version' op='>=' value='2.3.16' format='version'> |
| | | <tmpl_var name="ssl_comment">SSLProtocol All -SSLv3 |
| | | <tmpl_else> |
| | | <tmpl_var name="ssl_comment">SSLProtocol All -SSLv2 -SSLv3 |
| | | </tmpl_if> |
| | | <tmpl_var name="ssl_comment">SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt |
| | | <tmpl_var name="ssl_comment">SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key |
| | | <tmpl_var name="ssl_bundle_comment">SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle |
| | | |
| | | <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4 |
| | | <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS |
| | | <tmpl_var name="ssl_comment">SSLHonorCipherOrder On |
| | | <tmpl_if name='apache_version' op='>=' value='2.4.3' format='version'> |
| | | <tmpl_var name="ssl_comment">SSLCompression Off |
| | | </tmpl_if> |
| | | <tmpl_if name='apache_version' op='>=' value='2.4.11' format='version'> |
| | | <tmpl_var name="ssl_comment">SSLSessionTickets Off |
| | | </tmpl_if> |
| | | |
| | | <IfModule mod_headers.c> |
| | | Header always add Strict-Transport-Security "max-age=15768000" |
| | | </IfModule> |
| | | |
| | | <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| | | <tmpl_var name="ssl_comment">SSLUseStapling on |
| | | <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'> |
| | | <tmpl_var name="ssl_comment">SSLUseStapling On |
| | | <tmpl_var name="ssl_comment">SSLStaplingResponderTimeout 5 |
| | | <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors off |
| | | <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors Off |
| | | </tmpl_if> |
| | | </VirtualHost> |
| | | |
| | | <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| | | <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'> |
| | | <IfModule mod_ssl.c> |
| | | <tmpl_var name="ssl_comment">SSLStaplingCache shmcb:/var/run/ocsp(128000) |
| | | </IfModule> |
| | |
| | | } elseif($conf['bind']['installed'] == true) { |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | if(!$inst->find_installed_apps('haveged')) { |
| | | if(!is_installed('haveged')) { |
| | | swriteln("[INFO] haveged not detected - DNSSEC can fail"); |
| | | } |
| | | } else { |
| | |
| | | |
| | | if(is_array($_POST)) { |
| | | foreach($_POST as $key => $val) { |
| | | $tmp = json_decode($val); |
| | | $tmp = json_decode($val, true); |
| | | if(!$tmp) $params[] = $val; |
| | | else $params[] = (array)$tmp; |
| | | } |
| | |
| | | } |
| | | |
| | | //* Add slashes to all records, when we encode data which shall be inserted into mysql. |
| | | if($dbencode == true) $new_record[$key] = $app->db->quote($new_record[$key]); |
| | | if($dbencode == true && !is_null($new_record[$key])) $new_record[$key] = $app->db->quote($new_record[$key]); |
| | | } |
| | | } |
| | | return $new_record; |
| | |
| | | $this->errorMessage .= $errmsg."<br />\r\n"; |
| | | } |
| | | } |
| | | break; |
| | | case 'ISEMAIL': |
| | | $error = false; |
| | | if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; |
| | | if($validator['allowempty'] == 'y' && $field_value == '') { |
| | | //* Do nothing |
| | | } else { |
| | | if(function_exists('filter_var')) { |
| | | if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) { |
| | | $error = true; |
| | | } else { |
| | | if (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part |
| | | $error = true; |
| | | } |
| | | } |
| | | if ($error) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($this->wordbook[$errmsg])) { |
| | | $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n"; |
| | |
| | | $this->errorMessage .= $errmsg."<br />\r\n"; |
| | | } |
| | | } |
| | | |
| | | } else $this->errorMessage .= "function filter_var missing <br />\r\n"; |
| | | } |
| | | unset($error); |
| | | break; |
| | | case 'ISINT': |
| | | if(function_exists('filter_var') && $field_value < 2147483647) { |
| | |
| | | break; |
| | | case 'V6PREFIXLENGTH': |
| | | // find shortes ipv6 subnet can`t be longer |
| | | $sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1;"); |
| | | $sql_v6 = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND virtualhost = 'y' ORDER BY CHAR_LENGTH(ip_address) ASC LIMIT 0,1"); |
| | | $sql_v6_explode=explode(':',$sql_v6['ip_address']); |
| | | $explode_field_value = explode(':',$field_value); |
| | | if (count($sql_v6_explode) < count($explode_field_value) && isset($sql_v6['ip_address'])) { |
| | |
| | | } |
| | | } else { |
| | | $sql_insert_key .= "`$key`, "; |
| | | $sql_insert_val .= "'".$record[$key]."', "; |
| | | $sql_insert_val .= (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", "; |
| | | } |
| | | } else { |
| | | if($field['formtype'] == 'PASSWORD') { |
| | |
| | | $sql_update .= "`$key` = '".$record[$key]."', "; |
| | | } |
| | | } else { |
| | | $sql_update .= "`$key` = '".$record[$key]."', "; |
| | | $sql_update .= "`$key` = " . (is_null($record[$key]) ? 'NULL' : "'".$record[$key]."'") . ", "; |
| | | } |
| | | } |
| | | } else { |
| | |
| | | $wb['backup_mode_txt'] = 'Backupmodus'; |
| | | $wb['backup_mode_userzip'] = 'Backup Dateien gehören dem Web Benutzer (.zip Datei)'; |
| | | $wb['backup_mode_rootgz'] = 'Backup aller Dateien des Webverzeichnisses als Root Benutzer'; |
| | | $wb['backup_time_txt'] = 'Backupzeit'; |
| | | $wb['firewall_txt'] = 'Firewall'; |
| | | $wb['mailbox_quota_stats_txt'] = 'E-Mailkonto Beschränkung Statistiken'; |
| | | $wb['enable_ip_wildcard_txt'] = 'IP Adressen Wildcard (*) aktivieren'; |
| | |
| | | $wb["backup_mode_txt"] = 'Backup mode'; |
| | | $wb["backup_mode_userzip"] = 'Backup web files owned by web user as zip'; |
| | | $wb["backup_mode_rootgz"] = 'Backup all files in web directory as root user'; |
| | | $wb["backup_time_txt"] = 'Backup time'; |
| | | $wb["server_type_txt"] = 'Server Type'; |
| | | $wb["nginx_vhost_conf_dir_txt"] = 'Nginx Vhost config dir'; |
| | | $wb["nginx_vhost_conf_enabled_dir_txt"] = 'Nginx Vhost config enabled dir'; |
| | |
| | | <tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if> |
| | | |
| | | <div class="form-group"> |
| | | <div style="float:left;width:100%"> |
| | | <p class="label" style="width:270px">{tmpl_var name='use_domain_module_txt'}</p> |
| | | <div class="col-sm-9"> |
| | | <div class="col-sm-3 text-right"> |
| | | {tmpl_var name='use_domain_module'} |
| | | </div> |
| | | <div class="col-sm-9"> |
| | | <p><strong>{tmpl_var name='use_domain_module_txt'}</strong></p> |
| | | <p>{tmpl_var name='use_domain_module_hint'}</p> |
| | | </div> |
| | | <div style="float:left;width:500px;margin-top:20px">{tmpl_var name='use_domain_module_hint'}</div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='new_domain_txt'}</label> |
| | |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_mail_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'mail_servers_used'), |
| | |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_web_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'web_servers_used'), |
| | |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_dns_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'dns_servers_used'), |
| | |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_db_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'db_servers_used'), |
| | |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_mail_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'mail_servers_used'), |
| | |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_web_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'web_servers_used'), |
| | |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_dns_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'dns_servers_used'), |
| | |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'no_db_server_error'), |
| | | 1 => array ( 'type' => 'CUSTOM', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'db_servers_used'), |
| | |
| | | </a> |
| | | </h4> |
| | | </div> |
| | | <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail> |
| | | <div id="collapseMail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMail"> |
| | | <div class="panel-body"> |
| | | <div class="form-group"> |
| | | <label for="limit_maildomain" class="col-sm-3 control-label">{tmpl_var name='limit_maildomain_txt'}</label> |
| | |
| | | |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="4"><tmpl_var name="paging"></td> |
| | | <td colspan="3"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | |
| | | <div class='title'>{tmpl_var name='modules_title'}</div> |
| | | </div> |
| | | </div> |
| | | <a href='#' class='btn btn-default button' data-capp='{tmpl_var name="modules_name"}'>Go to {tmpl_var name='modules_title'}</a> |
| | | <a href='#' class='btn btn-default button' data-capp='{tmpl_var name="modules_name"}'>{tmpl_var name='go_to_txt'} {tmpl_var name='modules_title'}</a> |
| | | </li> |
| | | </tmpl_loop> |
| | | </ul> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Налични Модули'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Módulos Disponíveis'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Modules disponibles'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Dostupné moduly'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Verfügbare Module'; |
| | | $wb['go_to_txt'] = 'Gehe zu'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Διαθέσιμα αρθρώματα'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = "Available Modules"; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Módulos disponibles'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Modules disponibles'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Dostupni moduli'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Elérhető Modulok'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Modul yang tersedia'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Moduli disponibili'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Beschikbare modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Dostępne moduły'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Доступные модули'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Tillgängliga moduler'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Available Modules'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | <?php |
| | | $wb['available_modules_txt'] = 'Kullanılabilecek Modüller'; |
| | | $wb['go_to_txt'] = 'Go to'; |
| | | ?> |
| | |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'name_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', |
| | | 'regex' => '/^[a-zA-Z0-9\.\-\_]{1,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'mbox_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}\.$/', |
| | | 'regex' => '/^[a-zA-Z0-9\.\-\_\+]{0,255}\.$/', |
| | | 'errmsg'=> 'mbox_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | |
| | | <tmpl_loop name="records"> |
| | | <tr> |
| | | <td><a target="_blank" href="http://{tmpl_var name="domain"}/stats">{tmpl_var name="domain"}</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_month"} MB</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_month"} MB</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_year"} MB</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_year"} MB</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_month"}</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_month"}</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="this_year"}</a></td> |
| | | <td><a href="#" data-load-content="sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if><tmpl_if name='type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id'}">{tmpl_var name="last_year"}</a></td> |
| | | <td class="text-right"></td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tmpl_unless> |
| | | <tr> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_txt"}</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_month"} MB</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_month"} MB</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_year"} MB</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_year"} MB</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_month"}</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_month"}</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_year"}</a></td> |
| | | <td><a href="#" onclick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_year"}</a></td> |
| | | <td class="text-right"></td> |
| | | </tr> |
| | | </tbody> |
| | |
| | | * Now we have to check, if we should use the domain-module to select the domain |
| | | * or not |
| | | */ |
| | | $settings = $app->getconf->get_global_config('domains'); |
| | | if ($settings['use_domain_module'] == 'y') { |
| | | /* |
| | | * The domain-module is in use. |
| | |
| | | LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig |
| | | CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig |
| | | |
| | | <IfModule mod_headers.c> |
| | | <LocationMatch "/.well-known/acme-challenge/*"> |
| | | Header set Content-Type "text/plain" |
| | | </LocationMatch> |
| | | </IfModule> |
| | | |
| | | <Directory /var/www/clients> |
| | | AllowOverride None |
| | | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
| | |
| | | Order Deny,Allow |
| | | Deny from all |
| | | </tmpl_if> |
| | | |
| | | <IfModule mod_headers.c> |
| | | <LocationMatch "/.well-known/acme-challenge/*"> |
| | | Header set Content-Type "text/plain" |
| | | </LocationMatch> |
| | | </IfModule> |
| | | |
| | | </Directory> |
| | | |
| | | # Do not allow access to the root file system of the server for security reasons |
| | |
| | | } |
| | | </tmpl_if> |
| | | |
| | | location /\.well-known/acme-challenge { |
| | | root /usr/local/ispconfig/interface/acme/.well-known/acme-challenge; |
| | | location ~ /\.well-known/acme-challenge/ { |
| | | root /usr/local/ispconfig/interface/acme/; |
| | | index index.html index.htm; |
| | | try_files $uri =404; |
| | | } |
| | |
| | | |
| | | server_name <tmpl_var name='rewrite_domain'>; |
| | | |
| | | location /\.well-known/acme-challenge { |
| | | root /usr/local/ispconfig/interface/acme-challenge; |
| | | location ~ /\.well-known/acme-challenge/ { |
| | | root /usr/local/ispconfig/interface/acme/; |
| | | index index.html index.htm; |
| | | try_files $uri =404; |
| | | } |
| | |
| | | if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { |
| | | $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); |
| | | |
| | | $success = false; |
| | | if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) { |
| | | $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); |
| | | $success = $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); |
| | | } |
| | | }; |
| | | if(!$success) { |
| | | // error issuing cert |
| | | $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); |
| | | $data['new']['ssl_letsencrypt'] = 'n'; |
| | | if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; |
| | | /* Update the DB of the (local) Server */ |
| | | $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); |
| | | /* Update also the master-DB of the Server-Farm */ |
| | | $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); |
| | | } |
| | | } |
| | | |
| | | //* check is been correctly created |
| | | if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) { |
| | |
| | | |
| | | /* we don't need to store it. |
| | | /* Update the DB of the (local) Server */ |
| | | $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); |
| | | $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); |
| | | /* Update also the master-DB of the Server-Farm */ |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); |
| | | } |
| | | } |
| | | |
| | |
| | | //* Wrapper for exec function for easier debugging |
| | | private function _exec($command) { |
| | | global $app; |
| | | $out = array(); |
| | | $ret = 0; |
| | | $app->log('exec: '.$command, LOGLEVEL_DEBUG); |
| | | exec($command); |
| | | exec($command, $out, $ret); |
| | | if($ret != 0) return false; |
| | | else return true; |
| | | } |
| | | |
| | | private function _checkTcp ($host, $port) { |
| | |
| | | if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { |
| | | $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); |
| | | |
| | | $success = false; |
| | | if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) { |
| | | $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); |
| | | $success = $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); |
| | | } |
| | | }; |
| | | if(!$success) { |
| | | // error issuing cert |
| | | $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); |
| | | $data['new']['ssl_letsencrypt'] = 'n'; |
| | | if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; |
| | | /* Update the DB of the (local) Server */ |
| | | $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); |
| | | /* Update also the master-DB of the Server-Farm */ |
| | | $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); |
| | | } |
| | | } |
| | | |
| | | //* check is been correctly created |
| | | if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) { |
| | |
| | | |
| | | /* we don't need to store it. |
| | | /* Update the DB of the (local) Server */ |
| | | $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); |
| | | $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); |
| | | /* Update also the master-DB of the Server-Farm */ |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); |
| | | $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); |
| | | } |
| | | }; |
| | | |
| | |
| | | //* Wrapper for exec function for easier debugging |
| | | private function _exec($command) { |
| | | global $app; |
| | | $out = array(); |
| | | $ret = 0; |
| | | $app->log('exec: '.$command, LOGLEVEL_DEBUG); |
| | | exec($command); |
| | | exec($command, $out, $ret); |
| | | if($ret != 0) return false; |
| | | else return true; |
| | | } |
| | | |
| | | private function _checkTcp ($host, $port) { |