diff --git a/install/install.php b/install/install.php
index 0255c12aa197f67dad1a9866b1a5e476fcef7a24..46c313e49f2061d168734eaea775db3753034d21 100644
--- a/install/install.php
+++ b/install/install.php
@@ -281,7 +281,10 @@ if($install_mode == 'standard') {
 	swriteln('Installing ISPConfig');
 	
 	//** Customize the port ISPConfig runs on
-	$conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
+	$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080');
+	if($conf['apache']['installed'] == true) $conf['apache']['vhost_port']  = $ispconfig_vhost_port;
+	if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port']  = $ispconfig_vhost_port;
+	unset($ispconfig_vhost_port);
 
 	if(strtolower($inst->simple_query('Do you want a secure (SSL) connection to the ISPConfig web interface',array('y','n'),'y')) == 'y') {
 	  $inst->make_ispconfig_ssl_cert();
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 4d9d2d1f964f6a4ecaa41f28d25ba621aa9f5539..c09a600bbd9678b5d331d0e8b8cf687d59b0c159 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1939,6 +1939,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
 -- Dumping data for table `sys_config`
 --
 
-INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.2');
+INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.3');
 
 SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/install/tpl/apache_apps.vhost.master b/install/tpl/apache_apps.vhost.master
index 01b7eaf9fc90fca98c7ec59cbe4ec22b53800926..068158cb49b3d991667730eca9125f362d2c34b2 100644
--- a/install/tpl/apache_apps.vhost.master
+++ b/install/tpl/apache_apps.vhost.master
@@ -15,6 +15,7 @@
     DocumentRoot {apps_vhost_dir}
     AddType application/x-httpd-php .php
     <Directory {apps_vhost_dir}>
+      # php_admin_value open_basedir "{apps_vhost_dir}:/usr/share:/tmp"
       Options FollowSymLinks
       AllowOverride None
       Order allow,deny
diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master
index d3fc9a872067429522ca222d37baea5410948c2f..bca61b2790b1b41221bc2bf10cd99c7a2486fb01 100644
--- a/install/tpl/apache_ispconfig.vhost.master
+++ b/install/tpl/apache_ispconfig.vhost.master
@@ -27,6 +27,7 @@ NameVirtualHost *:{vhost_port}
     DocumentRoot /usr/local/ispconfig/interface/web/
     AddType application/x-httpd-php .php
     <Directory /usr/local/ispconfig/interface/web>
+      # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
       Options FollowSymLinks
       AllowOverride None
       Order allow,deny
diff --git a/install/tpl/apps_php_fpm_pool.conf.master b/install/tpl/apps_php_fpm_pool.conf.master
index adda0b587cd45a83d3c6880ba3b0a2f77c9af004..e851cf543152631667915c9e3716074631a56f2f 100644
--- a/install/tpl/apps_php_fpm_pool.conf.master
+++ b/install/tpl/apps_php_fpm_pool.conf.master
@@ -9,11 +9,12 @@ user = {fpm_user}
 group = {fpm_group}
 
 pm = dynamic
-pm.max_children = 50
-pm.start_servers = 20
-pm.min_spare_servers = 5
-pm.max_spare_servers = 35
+pm.max_children = 10
+pm.start_servers = 2
+pm.min_spare_servers = 1
+pm.max_spare_servers = 5
 
 chdir = /
 
+; php_admin_value[open_basedir] = /var/www/apps:/srv/www/apps:/usr/share
 php_admin_flag[magic_quotes_gpc] = off
\ No newline at end of file
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 75fa92e2bf3b756d5cec650b429b0b286a418f2c..1ac3c1e96b0c6f88e1e225fbbd09024928c7d9dc 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
 
 //** Application
 define('ISPC_APP_TITLE', 'ISPConfig');
-define('ISPC_APP_VERSION', '3.0.4.2');
+define('ISPC_APP_VERSION', '3.0.4.3');
 define('DEVSYSTEM', 0);
 
 
diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master
index 9de75dde6d5dc41e1778f52c4b02923c1f8f02ae..560f6b587eaf74bbca47b53253ec0825b4ea3541 100644
--- a/install/tpl/nginx_apps.vhost.master
+++ b/install/tpl/nginx_apps.vhost.master
@@ -5,6 +5,8 @@ server {
 
         root   {apps_vhost_dir};
 
+        client_max_body_size 20M;
+
         location / {
                index index.php index.html;
         }
@@ -41,12 +43,12 @@ server {
                        # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
-                       fastcgi_param SCRIPT_FILENAME $request_filename;
-                       fastcgi_param PATH_INFO $fastcgi_script_name;
+                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_buffer_size 128k;
                        fastcgi_buffers 256 4k;
                        fastcgi_busy_buffers_size 256k;
                        fastcgi_temp_file_write_size 256k;
+                       fastcgi_read_timeout 240;
                }
                location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                        root /usr/share/;
@@ -66,8 +68,7 @@ server {
                        # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
-                       fastcgi_param SCRIPT_FILENAME $request_filename;
-                       fastcgi_param PATH_INFO $fastcgi_script_name;
+                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_buffer_size 128k;
                        fastcgi_buffers 256 4k;
                        fastcgi_busy_buffers_size 256k;
diff --git a/install/tpl/nginx_ispconfig.vhost.master b/install/tpl/nginx_ispconfig.vhost.master
index 28b19eb30a407e50b6e841174e8e781e49eee597..72fbacf4f8e8b50525cfa8a0ca15bf4f3e190920 100644
--- a/install/tpl/nginx_ispconfig.vhost.master
+++ b/install/tpl/nginx_ispconfig.vhost.master
@@ -8,6 +8,8 @@ server {
 
         root   /usr/local/ispconfig/interface/web/;
 
+        client_max_body_size 20M;
+
         location / {
                index index.php index.html;
         }
diff --git a/install/tpl/php_fpm_pool.conf.master b/install/tpl/php_fpm_pool.conf.master
index fc193d01b8e363391742ba14ce992020242b41ab..dfa305944446c14f82cdaf2ee644df1241e77dd2 100644
--- a/install/tpl/php_fpm_pool.conf.master
+++ b/install/tpl/php_fpm_pool.conf.master
@@ -9,12 +9,13 @@ user = {fpm_user}
 group = {fpm_group}
 
 pm = dynamic
-pm.max_children = 50
-pm.start_servers = 20
-pm.min_spare_servers = 5
-pm.max_spare_servers = 35
+pm.max_children = 10
+pm.start_servers = 2
+pm.min_spare_servers = 1
+pm.max_spare_servers = 5
 
 chdir = /
 
+; php_admin_value[open_basedir] = /usr/local/ispconfig/interface:/usr/share
 php_admin_value[session.save_path] = /usr/local/ispconfig/server/temp
 php_admin_flag[magic_quotes_gpc] = off
\ No newline at end of file
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index 4f03c68cbb3823185f5f5d44f8c88b603b590660..96ab4a360a9f37a0beea2bebdd2f23255e46d476 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -295,7 +295,7 @@ class listform {
                     case 'DATETSTAMP':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
@@ -305,7 +305,7 @@ class listform {
 					case 'DATE':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
@@ -316,7 +316,7 @@ class listform {
                     case 'DATETIME':
                         if ($record[$key] > 0) {
 							// is value int?
-							if (preg_match("/^[0-9]+[.]?[0-9]*$/", $record[$key], $p)) {
+							if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
 	                        	$record[$key] = date($this->lng('conf_format_datetime'), $record[$key]);
 							} else {
 	                        	$record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key]));
diff --git a/interface/web/admin/templates/language_edit.htm b/interface/web/admin/templates/language_edit.htm
index 75376dfaa7999c89253c053a34b633f97c911e7b..39403cecb51b3a8a4318ddfb1f5d43e225a32306 100644
--- a/interface/web/admin/templates/language_edit.htm
+++ b/interface/web/admin/templates/language_edit.htm
@@ -9,7 +9,7 @@
         <tmpl_loop name="records">
         <span class="wf_oneField">
           <label for="records[{tmpl_var name="key"}]" class="wf_preField">{tmpl_var name="key"}</label>
-          <input type="text" id="records[{tmpl_var name="key"}]" name="records[{tmpl_var name="key"}]" value="{tmpl_var name='val'}" size="50" maxlength="255">
+          <input type="text" id="records[{tmpl_var name="key"}]" name="records[{tmpl_var name="key"}]" value="{tmpl_var name='val'}" size="50" >
         </span> 
         </tmpl_loop>
       </span>
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index da93a2eadaee57b80038fc926de750010c030bbb..ed522f6b02e5776cc41e463f7255f65f8cc0571e 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -75,25 +75,25 @@
 						{tmpl_var name='enable_sni'}
 					</div>
 			</div>
-	  <div class="ctrlHolder apache">
+	  <div class="ctrlHolder">
 				<p class="label">{tmpl_var name='set_folder_permissions_on_update_txt'}</p>
 					<div class="multiField">
 						{tmpl_var name='set_folder_permissions_on_update'}
 					</div>
 			</div>
-	  <div class="ctrlHolder apache">
+	  <div class="ctrlHolder">
 				<p class="label">{tmpl_var name='add_web_users_to_sshusers_group_txt'}</p>
 					<div class="multiField">
 						{tmpl_var name='add_web_users_to_sshusers_group'}
 					</div>
 			</div>
-	  <div class="ctrlHolder apache">
+	  <div class="ctrlHolder">
 				<p class="label">{tmpl_var name='connect_userid_to_webid_txt'}</p>
 					<div class="multiField">
 						{tmpl_var name='connect_userid_to_webid'}
 					</div>
 			</div>
-	  <div class="ctrlHolder apache">
+	  <div class="ctrlHolder">
       	<label for="connect_userid_to_webid_start">{tmpl_var name='connect_userid_to_webid_start_txt'}</label>
         <input name="connect_userid_to_webid_start" id="connect_userid_to_webid_start" value="{tmpl_var name='connect_userid_to_webid_start'}" size="40" maxlength="255" type="text" class="textInput" />
 			</div>
diff --git a/interface/web/dns/list/dns_soa.list.php b/interface/web/dns/list/dns_soa.list.php
index bedecb3b620e4d1f4f0dcc57cfcff8906e47e9d3..89cc766d1dcac4ffb9b72a809372508c5eb904e1 100644
--- a/interface/web/dns/list/dns_soa.list.php
+++ b/interface/web/dns/list/dns_soa.list.php
@@ -55,7 +55,7 @@ $liste["item"][] = array(	'field'		=> "active",
 							'prefix'	=> "",
 							'suffix'	=> "",
 							'width'		=> "",
-							'value'		=> array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
+							'value'		=> array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'N' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
 
 
 $liste["item"][] = array(	'field'		=> "server_id",
diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm
index 3928af2feb1ef3b28fb7d26bce92580323e70f3a..658b3740852eb60a049d5cba8caab92afb557bd7 100644
--- a/interface/web/dns/templates/dns_soa_list.htm
+++ b/interface/web/dns/templates/dns_soa_list.htm
@@ -43,7 +43,7 @@
         <tbody>
           <tmpl_loop name="records">
           <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
-            <td class="tbl_col_active"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');"><img src="themes/{tmpl_var name='theme'}/icons/{tmpl_var name='_active_'}" border="0" /></a></td>
+            <td class="tbl_col_active"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</td>
             <td class="tbl_col_server_id"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
             <td class="tbl_col_origin"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="origin"}</a></td>
             <td class="tbl_col_ns"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="ns"}</a></td>
diff --git a/interface/web/mail/mail_alias_edit.php b/interface/web/mail/mail_alias_edit.php
index ead9bc277cc712a4e8d830b92947083e09e75355..b7140b03d890af62e2d1537b24519760fb8b76c2 100644
--- a/interface/web/mail/mail_alias_edit.php
+++ b/interface/web/mail/mail_alias_edit.php
@@ -74,7 +74,8 @@ class page_action extends tform_actions {
 		$app->tpl->setVar("email_local_part",$email_parts[0]);
 		
 		// Getting Domains of the user
-		$sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain';
+		// $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain';
+		$sql = "SELECT domain FROM mail_domain WHERE domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain') AND ".$app->tform->getAuthSQL('r')." ORDER BY domain";
 		$domains = $app->db->queryAllRecords($sql);
 		$domain_select = '';
 		if(is_array($domains)) {
diff --git a/interface/web/sites/form/web_aliasdomain.tform.php b/interface/web/sites/form/web_aliasdomain.tform.php
index 1eb79c596e6ee79caf2d2f0b58633a76fd3dfc24..9507aa0663123ceb535e5b4fe10914ba5d75a331 100644
--- a/interface/web/sites/form/web_aliasdomain.tform.php
+++ b/interface/web/sites/form/web_aliasdomain.tform.php
@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+														'regex' => '@^(([\.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
 														'errmsg'=> 'redirect_error_regex'),
 									),
 			'default'	=> '',
diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php
index 241e6eaca6b7316355e19123f61bfb1eda79b3be..af05cdfa1352d02302f9eb677edd77e2f71beda3 100644
--- a/interface/web/sites/form/web_domain.tform.php
+++ b/interface/web/sites/form/web_domain.tform.php
@@ -253,7 +253,7 @@ $form["tabs"]['redirect'] = array (
 		'redirect_path' => array (
 			'datatype'	=> 'VARCHAR',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+														'regex' => '@^(([\.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
 														'errmsg'=> 'redirect_error_regex'),
 									),
 			'formtype'	=> 'TEXT',
@@ -287,7 +287,7 @@ $form["tabs"]['ssl'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
 														'errmsg'=> 'ssl_state_error_regex'),
 									),
 			'default'	=> '',
@@ -299,7 +299,7 @@ $form["tabs"]['ssl'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
 														'errmsg'=> 'ssl_locality_error_regex'),
 									),
 			'default'	=> '',
@@ -311,7 +311,7 @@ $form["tabs"]['ssl'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
 														'errmsg'=> 'ssl_organisation_error_regex'),
 									),
 			'default'	=> '',
@@ -323,7 +323,7 @@ $form["tabs"]['ssl'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
 														'errmsg'=> 'ssl_organistaion_unit_error_regex'),
 									),
 			'default'	=> '',
@@ -336,7 +336,7 @@ $form["tabs"]['ssl'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '/^(([.]{0})|([A-Z]{2,2}))$/',
+														'regex' => '/^(([\.]{0})|([A-Z]{2,2}))$/',
 														'errmsg'=> 'ssl_country_error_regex'),
 									),
 			'default'	=> '',
@@ -538,7 +538,7 @@ $form["tabs"]['advanced'] = array (
 														'regex' => '/^([1-9][0-9]{0,10})$/',
 														'errmsg'=> 'pm_max_children_error_regex'),
 									),
-			'default'	=> '50',
+			'default'	=> '10',
 			'value'		=> '',
 			'width'		=> '3',
 			'maxlength'	=> '3'
@@ -550,7 +550,7 @@ $form["tabs"]['advanced'] = array (
 														'regex' => '/^([1-9][0-9]{0,10})$/',
 														'errmsg'=> 'pm_start_servers_error_regex'),
 									),
-			'default'	=> '20',
+			'default'	=> '2',
 			'value'		=> '',
 			'width'		=> '3',
 			'maxlength'	=> '3'
@@ -562,7 +562,7 @@ $form["tabs"]['advanced'] = array (
 														'regex' => '/^([1-9][0-9]{0,10})$/',
 														'errmsg'=> 'pm_min_spare_servers_error_regex'),
 									),
-			'default'	=> '5',
+			'default'	=> '1',
 			'value'		=> '',
 			'width'		=> '3',
 			'maxlength'	=> '3'
@@ -574,7 +574,7 @@ $form["tabs"]['advanced'] = array (
 														'regex' => '/^([1-9][0-9]{0,10})$/',
 														'errmsg'=> 'pm_max_spare_servers_error_regex'),
 									),
-			'default'	=> '35',
+			'default'	=> '5',
 			'value'		=> '',
 			'width'		=> '3',
 			'maxlength'	=> '3'
diff --git a/interface/web/sites/form/web_subdomain.tform.php b/interface/web/sites/form/web_subdomain.tform.php
index 482476a9b73355e42e879a62350d7cfc0ae3098a..9b2744b682826d8f60829633ebbf9b15891e5853 100644
--- a/interface/web/sites/form/web_subdomain.tform.php
+++ b/interface/web/sites/form/web_subdomain.tform.php
@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
-														'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+														'regex' => '@^(([\.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
 														'errmsg'=> 'redirect_error_regex'),
 									),
 			'default'	=> '',
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 810f43a7f1e97bdc8e913db11a9c05537ef529cf..178c639ed20c17865f8be2c7e0ebe562d71dba22 100644
--- a/interface/web/sites/templates/web_domain_edit.htm
+++ b/interface/web/sites/templates/web_domain_edit.htm
@@ -26,6 +26,8 @@
 					{tmpl_var name='client_group_id'}
 				</select>
       </div>
+	  <tmpl_else>
+		<input type="hidden" id="server_id" name="server_id" value="{tmpl_var name='server_id_value'}" />
       </tmpl_if>
       <tmpl_if name="is_reseller">
       <div class="ctrlHolder">
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 91b965c12f8c58aeb56b9752f15cf42daba0e19e..e510bfe5242338edfef89b18ff59cbe7f46e0023 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -74,6 +74,11 @@ class page_action extends tform_actions {
 			if(!$app->tform->checkResellerLimit('limit_web_domain',"type = 'vhost'")) {
 				$app->error('Reseller: '.$app->tform->wordbook["limit_web_domain_txt"]);
 			}
+			
+			// Get the limits of the client
+			$client_group_id = $_SESSION["s"]["user"]["default_group"];
+			$client = $app->db->queryOneRecord("SELECT client.default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+			$app->tpl->setVar("server_id_value", $client['default_webserver']);
 		}
 
 		parent::onShowNew();
diff --git a/remoting_client/examples/sites_database_add.php b/remoting_client/examples/sites_database_add.php
index 0337dad1648713635dbf277007cc346e4edab5e5..26ed3e6b4a28034e51867143f81fe65e69ec2893 100644
--- a/remoting_client/examples/sites_database_add.php
+++ b/remoting_client/examples/sites_database_add.php
@@ -19,11 +19,11 @@ try {
 	$params = array(
 			'server_id' => 1,
 			'type' => 'mysql',
-			'database_name' => 'db_name1',
-			'database_user' => 'db_name1',
-			'database_password' => 'db_name1',
+			'database_name' => 'db_name2',
+			'database_user' => 'db_name2',
+			'database_password' => 'db_name2',
 			'database_charset' => 'UTF8',
-			'remote_access' => 'n',
+			'remote_access' => 'y',
 			'remote_ips' => '',
 			'active' => 'y'
 			);
diff --git a/server/conf/apps_php_fpm_pool.conf.master b/server/conf/apps_php_fpm_pool.conf.master
index adda0b587cd45a83d3c6880ba3b0a2f77c9af004..2cc72583ce476ec0cf1a707b5a645def55c4330c 100644
--- a/server/conf/apps_php_fpm_pool.conf.master
+++ b/server/conf/apps_php_fpm_pool.conf.master
@@ -16,4 +16,5 @@ pm.max_spare_servers = 35
 
 chdir = /
 
+; php_admin_value[open_basedir] = /var/www/apps:/srv/www/apps:/usr/share
 php_admin_flag[magic_quotes_gpc] = off
\ No newline at end of file
diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master
index 9de75dde6d5dc41e1778f52c4b02923c1f8f02ae..560f6b587eaf74bbca47b53253ec0825b4ea3541 100644
--- a/server/conf/nginx_apps.vhost.master
+++ b/server/conf/nginx_apps.vhost.master
@@ -5,6 +5,8 @@ server {
 
         root   {apps_vhost_dir};
 
+        client_max_body_size 20M;
+
         location / {
                index index.php index.html;
         }
@@ -41,12 +43,12 @@ server {
                        # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
-                       fastcgi_param SCRIPT_FILENAME $request_filename;
-                       fastcgi_param PATH_INFO $fastcgi_script_name;
+                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_buffer_size 128k;
                        fastcgi_buffers 256 4k;
                        fastcgi_busy_buffers_size 256k;
                        fastcgi_temp_file_write_size 256k;
+                       fastcgi_read_timeout 240;
                }
                location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                        root /usr/share/;
@@ -66,8 +68,7 @@ server {
                        # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
-                       fastcgi_param SCRIPT_FILENAME $request_filename;
-                       fastcgi_param PATH_INFO $fastcgi_script_name;
+                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_buffer_size 128k;
                        fastcgi_buffers 256 4k;
                        fastcgi_busy_buffers_size 256k;
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 1d29d0709e333da386eb31a4e674968761d5ad89..4c698e0530ccae8ba644f21b465a2a8889afbd9b 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -42,11 +42,12 @@
 	SSLEngine on
     SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt
     SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key
-</tmpl_if>
 <tmpl_if name='has_bundle_cert'>
     SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.bundle
+</tmpl_if>
 </tmpl_if>
     </IfModule>
+
     <Directory {tmpl_var name='web_document_root_www'}>
         Options FollowSymLinks
         AllowOverride <tmpl_var name='allow_override'>
@@ -182,6 +183,7 @@
         FcgidConnectTimeout 3
         FcgidIOTimeout 360
         FcgidBusyTimeout 300
+		FcgidMaxRequestLen 1073741824
 <tmpl_else>
         IdleTimeout 300
         ProcessLifeTime 3600
diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index 5e39e55d6e5a9cc60cd902d14663721a00575d09..87f964dc5bd9b49dff64393ac25db7747f795db7 100755
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -49,7 +49,7 @@ class app {
 					if we are in a multiserver setup
 					*/
 					
-					if($conf['dbmaster_host'] != '' && $conf['dbmaster_host'] != $conf['db_host']) {
+					if($conf['dbmaster_host'] != '' && ($conf['dbmaster_host'] != $conf['db_host'] || ($conf['dbmaster_host'] == $conf['db_host'] && $conf['dbmaster_database'] != $conf['db_database']))) {
 						$this->dbmaster = new db($conf['dbmaster_host'], $conf['dbmaster_user'], $conf['dbmaster_password'], $conf['dbmaster_database']);
 					} else {
 						$this->dbmaster = $this->db;
diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php
index ef600bde4df65753c3c6ed4c02449ca3b9690d0f..143683d051fc716b9d95e1bba37a5b8dd59e7593 100644
--- a/server/lib/classes/modules.inc.php
+++ b/server/lib/classes/modules.inc.php
@@ -83,7 +83,7 @@ class modules {
 		global $app,$conf;
 		
 		//* If its a multiserver setup
-		if($app->db->dbHost != $app->dbmaster->dbHost) {
+		if($app->db->dbHost != $app->dbmaster->dbHost || ($app->db->dbHost == $app->dbmaster->dbHost && $app->db->dbName != $app->dbmaster->dbName)) {
 			if($conf['mirror_server_id'] > 0) {
 				$sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf['server_id']." OR server_id = ".$conf['mirror_server_id']." OR server_id = 0) ORDER BY datalog_id";
 			} else {
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 00b9759342923e7d9aa3c0996188a9bf364505dd..dab75b5aa91049df88267c2093d3ef93fcf9ac7b 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -1020,7 +1020,7 @@ class monitor_tools {
 				/*
 				 * Fetch the output
 				 */
-				$data['output'] = shell_exec('mpt-status --autoload -n');
+				$data['output'] = shell_exec('mpt-status --autoload');
 
 				/*
 				 * Then calc the state.
@@ -1032,7 +1032,7 @@ class monitor_tools {
 						* The output contains information for every RAID and every HDD.
 						* We only need the state of the RAID
 						*/
-						if (strpos($item, 'raidlevel:') !== false) {
+						if (strpos($item, 'state ') !== false) {
 							/*
 							* We found a raid, process the state of it
 							*/