From 49b3f5ec2a3c105652d451469eeb09a5ed75eba0 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 30 Sep 2014 06:27:51 -0400
Subject: [PATCH] Fixed: FS#3683 - New gtld - regex issue while defining alias emaildomains

---
 server/plugins-available/apache2_plugin.inc.php |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index bdf6a05..3c4ba3e 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -148,6 +148,7 @@
 
         [ req ]
         default_bits           = 2048
+		default_md             = sha256
         default_keyfile        = keyfile.pem
         distinguished_name     = req_distinguished_name
         attributes             = req_attributes
@@ -188,7 +189,7 @@
 			if(is_file($ssl_cnf_file) && !is_link($ssl_cnf_file)) {
 
 				exec("openssl genrsa -des3 -rand $rand_file -passout pass:$ssl_password -out $openssl_cmd_key_file 2048");
-				exec("openssl req -new -passin pass:$ssl_password -passout pass:$ssl_password -key $openssl_cmd_key_file -out $openssl_cmd_csr_file -days $ssl_days -config $config_file");
+				exec("openssl req -new -sha256 -passin pass:$ssl_password -passout pass:$ssl_password -key $openssl_cmd_key_file -out $openssl_cmd_csr_file -days $ssl_days -config $config_file");
 				exec("openssl rsa -passin pass:$ssl_password -in $openssl_cmd_key_file -out $openssl_cmd_key_file2");
 
 				if(file_exists($web_config['CA_path'].'/openssl.cnf'))
@@ -1261,8 +1262,9 @@
 		$pool_name = 'web'.$data['new']['domain_id'];
 		$socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']);
 		if(substr($socket_dir, -1) != '/') $socket_dir .= '/';
-
-		if($data['new']['php_fpm_use_socket'] == 'y'){
+		
+		// User sockets, but not with apache 2.4 as socket support is buggy in that version
+		if($data['new']['php_fpm_use_socket'] == 'y' && $app->system->getapacheversion() < 2.4){
 			$use_tcp = 0;
 			$use_socket = 1;
 		} else {

--
Gitblit v1.9.1