diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index 991f1b0cea39df974c3b1edbdb2b45d79363eaaf..aba95279e8b18f4eac8a7a9c30572c4ea3780561 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -67,11 +67,11 @@
             </div>
             <div class="ctrlHolder">
                 <label for="relayhost_user">{tmpl_var name='relayhost_user_txt'}</label>
-                <input name="relayhost_user" id="relayhost_user" value="{tmpl_var name='relayhost_user'}" size="40" maxlength="255" type="text" class="textInput formLengthHalf" />
+                <input name="relayhost_user" id="relayhost_user" value="{tmpl_var name='relayhost_user'}" size="40" maxlength="255" type="text" class="textInput formLengthHalf" autocomplete="off" />
             </div>
             <div class="ctrlHolder">
                 <label for="relayhost_password">{tmpl_var name='relayhost_password_txt'}</label>
-                <input name="relayhost_password" id="relayhost_password" value="{tmpl_var name='relayhost_password'}" size="40" maxlength="255" type="password" class="textInput formLengthHalf" />
+                <input name="relayhost_password" id="relayhost_password" value="{tmpl_var name='relayhost_password'}" size="40" maxlength="255" type="password" class="textInput formLengthHalf" autocomplete="off" />
             </div>
             <div class="ctrlHolder">
                 <label for="mailbox_size_limit">{tmpl_var name='mailbox_size_limit_txt'}</label>
diff --git a/interface/web/sites/web_aliasdomain_edit.php b/interface/web/sites/web_aliasdomain_edit.php
index b220011dd3c2e678a7661efba79886b7056c022c..0edb274b8e6b74955d398b552cf8fa5e55a9a0c8 100644
--- a/interface/web/sites/web_aliasdomain_edit.php
+++ b/interface/web/sites/web_aliasdomain_edit.php
@@ -124,6 +124,9 @@ class page_action extends tform_actions {
 	function onSubmit() {
 		global $app, $conf;
 
+		// Get the record of the parent domain
+		$parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+		if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
 		/* check if the domain module is used - and check if the selected domain can be used! */
 		$app->uses('ini_parser,getconf');
 		$settings = $app->getconf->get_global_config('domains');
@@ -142,14 +145,9 @@ class page_action extends tform_actions {
 			$app->tform->errorMessage .= $app->tform->lng("error_proxy_requires_url")."<br />";
 		}
 
-		// Get the record of the parent domain
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["parent_domain_id"]);
-		if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
-
 		// Set a few fixed values
 		$this->dataRecord["type"] = 'alias';
 		$this->dataRecord["server_id"] = $parent_domain["server_id"];
-		//$this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
 
 		$this->parent_domain_record = $parent_domain;
 
@@ -177,8 +175,8 @@ class page_action extends tform_actions {
 
 			//* Update the old website, so that the vhost alias gets removed
 			//* We force the update by inserting a transaction record without changes manually.
-			$old_website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $this->oldDataRecord['domain_id']);
-			$app->db->datalogSave('web_domain', 'UPDATE', 'domain_id', $this->oldDataRecord['parent_domain_id'], $old_website, $old_website, true);
+			$old_website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$app->functions->intval($this->oldDataRecord['domain_id']));
+			$app->db->datalogSave('web_domain', 'UPDATE', 'domain_id', $app->functions->intval($this->oldDataRecord['parent_domain_id']), $old_website, $old_website, true);
 		}
 
 	}
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 7540e6ccf93941c3c04c325fae3f403abfbfe45a..f47b30d13dfde95729e139d62e3094bc800858ea 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -634,7 +634,7 @@ class page_action extends tform_actions {
 			// only generate quota and traffic warnings if value has changed
 			if($this->id > 0) {
 				$old_web_values = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
-			}  else {
+			} else {
 				$old_web_values = array();
 			}
 
diff --git a/interface/web/sites/web_subdomain_edit.php b/interface/web/sites/web_subdomain_edit.php
index 1ed4344668ec29dbf57c722502a4884da84e6698..0d485c4394af8819aabea0959e55d00ef0f1a1ff 100644
--- a/interface/web/sites/web_subdomain_edit.php
+++ b/interface/web/sites/web_subdomain_edit.php
@@ -134,7 +134,7 @@ class page_action extends tform_actions {
 		// Get the record of the parent domain
 		$parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
 		if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
-
+		/* check if the domain module is used - and check if the selected domain can be used! */
 		$app->uses('ini_parser,getconf');
 		$settings = $app->getconf->get_global_config('domains');
 		if ($settings['use_domain_module'] == 'y') {
diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php
index 3a228c5dac668a74828b5bc7f6a39d991aab4ef9..a2242dcc936cd080e1f3a7e8667e586c7736cbfe 100644
--- a/interface/web/sites/web_vhost_subdomain_edit.php
+++ b/interface/web/sites/web_vhost_subdomain_edit.php
@@ -250,7 +250,7 @@ class page_action extends tform_actions {
 			$php_directive_snippets_txt = '';
 			if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){
 				foreach($php_directive_snippets as $php_directive_snippet){
-					$php_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$php_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$php_directive_snippet['snippet'].'</pre></a> ';
+					$php_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$php_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($php_directive_snippet['snippet']).'</pre></a> ';
 				}
 			}
 			if($php_directive_snippets_txt == '') $php_directive_snippets_txt = '------';
@@ -261,7 +261,7 @@ class page_action extends tform_actions {
 				$apache_directive_snippets_txt = '';
 				if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){
 					foreach($apache_directive_snippets as $apache_directive_snippet){
-						$apache_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$apache_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$apache_directive_snippet['snippet'].'</pre></a> ';
+						$apache_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$apache_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($apache_directive_snippet['snippet']).'</pre></a> ';
 					}
 				}
 				if($apache_directive_snippets_txt == '') $apache_directive_snippets_txt = '------';
@@ -273,7 +273,7 @@ class page_action extends tform_actions {
 				$nginx_directive_snippets_txt = '';
 				if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){
 					foreach($nginx_directive_snippets as $nginx_directive_snippet){
-						$nginx_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$nginx_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$nginx_directive_snippet['snippet'].'</pre></a> ';
+						$nginx_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$nginx_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($nginx_directive_snippet['snippet']).'</pre></a> ';
 					}
 				}
 				if($nginx_directive_snippets_txt == '') $nginx_directive_snippets_txt = '------';
@@ -284,7 +284,7 @@ class page_action extends tform_actions {
 			$proxy_directive_snippets_txt = '';
 			if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){
 				foreach($proxy_directive_snippets as $proxy_directive_snippet){
-					$proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$proxy_directive_snippet['snippet'].'</pre></a> ';
+					$proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($proxy_directive_snippet['snippet']).'</pre></a> ';
 				}
 			}
 			if($proxy_directive_snippets_txt == '') $proxy_directive_snippets_txt = '------';
@@ -293,13 +293,17 @@ class page_action extends tform_actions {
 
 		$ssl_domain_select = '';
 		$tmp = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$this->id);
-		$ssl_domains = array($tmp["domain"], 'www.'.$tmp["domain"]);
+		$ssl_domains = array($tmp["domain"], 'www.'.$tmp["domain"], '*.'.$tmp["domain"]);
 		if(is_array($ssl_domains)) {
 			foreach( $ssl_domains as $ssl_domain) {
 				$selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':'';
 				$ssl_domain_select .= "<option value='$ssl_domain' $selected>$ssl_domain</option>\r\n";
 			}
 		}
+		$app->tpl->setVar("ssl_domain", $ssl_domain_select);
+		unset($ssl_domain_select);
+		unset($ssl_domains);
+		unset($ssl_domain);
 
 		if($this->id > 0) {
 			$app->tpl->setVar('fixed_folder', 'y');
@@ -309,11 +313,6 @@ class page_action extends tform_actions {
 			$app->tpl->setVar('server_id_value', $parent_domain['server_id']);
 		}
 
-		$app->tpl->setVar("ssl_domain", $ssl_domain_select);
-		unset($ssl_domain_select);
-		unset($ssl_domains);
-		unset($ssl_domain);
-
 		$tmp_txt = ($this->dataRecord['traffic_quota_lock'] == 'y')?'<b>('.$app->tform->lng('traffic_quota_exceeded_txt').')</b>':'';
 		$app->tpl->setVar("traffic_quota_exceeded_txt", $tmp_txt);
 
@@ -355,6 +354,17 @@ class page_action extends tform_actions {
 		}
 		$app->tpl->setVar("domain", $this->dataRecord["domain"]);
 
+		// check for configuration errors in sys_datalog
+		if($this->id > 0) {
+			$datalog = $app->db->queryOneRecord("SELECT sys_datalog.error, sys_log.tstamp FROM sys_datalog, sys_log WHERE sys_datalog.dbtable = 'web_domain' AND sys_datalog.dbidx = 'domain_id:".$app->functions->intval($this->id)."' AND sys_datalog.datalog_id = sys_log.datalog_id AND sys_log.message = CONCAT('Processed datalog_id ',sys_log.datalog_id) ORDER BY sys_datalog.tstamp DESC");
+			if(is_array($datalog) && !empty($datalog)){
+				if(trim($datalog['error']) != ''){
+					$app->tpl->setVar("config_error_msg", nl2br(htmlentities($datalog['error'])));
+					$app->tpl->setVar("config_error_tstamp", date($app->lng('conf_format_datetime'), $datalog['tstamp']));
+				}
+			}
+		}
+
 		parent::onShowEnd();
 	}
 
@@ -436,7 +446,7 @@ class page_action extends tform_actions {
 			if($client['limit_perl'] != 'y') $this->dataRecord['perl'] = '-';
 			if($client['limit_ruby'] != 'y') $this->dataRecord['ruby'] = '-';
 			if($client['limit_python'] != 'y') $this->dataRecord['python'] = '-';
-			if($client['force_suexec'] != 'n') $this->dataRecord['suexec'] = 'y';
+			if($client['force_suexec'] == 'y') $this->dataRecord['suexec'] = 'y';
 			if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = '-';
 			if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = '-';
 			if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = '-';
@@ -445,7 +455,7 @@ class page_action extends tform_actions {
 			if($this->id > 0) {
 				$old_web_values = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
 			} else {
-				$old_web_values = $_POST;
+				$old_web_values = array();
 			}
 
 			//* Check the traffic quota of the client