From cbe7792929e960d976027ac718d46fe82f059a68 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sun, 6 Oct 2013 18:59:10 +0200 Subject: [PATCH] clean-up for fpm (remove unecessary stuff), thx to tomreyn & Sephi Signed-off-by: Michael Kaufmann (d00p) --- scripts/jobs/cron_tasks.inc.http.10.apache.php | 7 +++---- scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php | 3 +-- .../apache2/etc_apache2_mods-enabled_fastcgi.conf | 1 - .../apache2/etc_apache2_mods-enabled_fastcgi.conf | 1 - .../gentoo/apache2/etc_apache2_modules.d_70_fastcgi.conf | 1 - .../apache2/etc_apache2_mods-enabled_fastcgi.conf | 1 - .../apache2/etc_apache2_mods-enabled_fastcgi.conf | 1 - 7 files changed, 4 insertions(+), 11 deletions(-) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index b4110ccf..fbf8826a 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -275,12 +275,11 @@ class apache $php = new phpinterface($this->getDB(), $this->settings, $domain); $phpconfig = $php->getPhpConfig($this->settings['phpfpm']['vhost_defaultini']); - $this->virtualhosts_data[$vhosts_filename] .= ' SuexecUserGroup "' . $this->settings['phpfpm']['vhost_httpuser'] . '" "' . $this->settings['phpfpm']['vhost_httpgroup'] . '"' . "\n"; - $srvName = 'fpm.external'; + $srvName = substr(md5($ipport),0,4).'.fpm.external'; if ($row_ipsandports['ssl']) { - $srvName = 'ssl-fpm.external'; + $srvName = substr(md5($ipport),0,4).'.ssl-fpm.external'; } - $this->virtualhosts_data[$vhosts_filename] .= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName .' -socket ' . $php->getInterface()->getSocketFile() . ' -user ' . $this->settings['phpfpm']['vhost_httpuser'] . ' -group ' . $this->settings['phpfpm']['vhost_httpgroup'] . " -idle-timeout " . $this->settings['phpfpm']['idle_timeout'] . "\n"; + $this->virtualhosts_data[$vhosts_filename] .= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName .' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n"; $this->virtualhosts_data[$vhosts_filename] .= ' ' . "\n"; $file_extensions = explode(' ', $phpconfig['file_extensions']); $this->virtualhosts_data[$vhosts_filename] .= ' ' . "\n"; diff --git a/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php b/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php index c012d811..fc2a60b8 100644 --- a/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php +++ b/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php @@ -37,12 +37,11 @@ class apache_fcgid extends apache if((int)$this->settings['phpfpm']['enabled'] == 1) { - $php_options_text.= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n"; $srvName = 'fpm.external'; if ($domain['ssl'] == 1 && $ssl_vhost) { $srvName = 'ssl-fpm.external'; } - $php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -user ' . $domain['loginname'] . ' -group ' . $domain['loginname'] . " -idle-timeout " . $this->settings['phpfpm']['idle_timeout'] . "\n"; + $php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n"; $php_options_text.= ' ' . "\n"; $php_options_text.= ' ' . "\n"; $php_options_text.= ' SetHandler php5-fastcgi'. "\n"; diff --git a/templates/misc/configfiles/debian_squeeze/apache2/etc_apache2_mods-enabled_fastcgi.conf b/templates/misc/configfiles/debian_squeeze/apache2/etc_apache2_mods-enabled_fastcgi.conf index 704727c5..1b226af8 100644 --- a/templates/misc/configfiles/debian_squeeze/apache2/etc_apache2_mods-enabled_fastcgi.conf +++ b/templates/misc/configfiles/debian_squeeze/apache2/etc_apache2_mods-enabled_fastcgi.conf @@ -1,5 +1,4 @@ - FastCgiWrapper /usr/lib/apache2/suexec FastCgiIpcDir /var/run/apache2/ diff --git a/templates/misc/configfiles/debian_wheezy/apache2/etc_apache2_mods-enabled_fastcgi.conf b/templates/misc/configfiles/debian_wheezy/apache2/etc_apache2_mods-enabled_fastcgi.conf index 704727c5..1b226af8 100644 --- a/templates/misc/configfiles/debian_wheezy/apache2/etc_apache2_mods-enabled_fastcgi.conf +++ b/templates/misc/configfiles/debian_wheezy/apache2/etc_apache2_mods-enabled_fastcgi.conf @@ -1,5 +1,4 @@ - FastCgiWrapper /usr/lib/apache2/suexec FastCgiIpcDir /var/run/apache2/ diff --git a/templates/misc/configfiles/gentoo/apache2/etc_apache2_modules.d_70_fastcgi.conf b/templates/misc/configfiles/gentoo/apache2/etc_apache2_modules.d_70_fastcgi.conf index a46de602..1b226af8 100644 --- a/templates/misc/configfiles/gentoo/apache2/etc_apache2_modules.d_70_fastcgi.conf +++ b/templates/misc/configfiles/gentoo/apache2/etc_apache2_modules.d_70_fastcgi.conf @@ -1,5 +1,4 @@ - FastCgiWrapper /usr/sbin/suexec FastCgiIpcDir /var/run/apache2/ diff --git a/templates/misc/configfiles/ubuntu_lucid/apache2/etc_apache2_mods-enabled_fastcgi.conf b/templates/misc/configfiles/ubuntu_lucid/apache2/etc_apache2_mods-enabled_fastcgi.conf index 704727c5..1b226af8 100644 --- a/templates/misc/configfiles/ubuntu_lucid/apache2/etc_apache2_mods-enabled_fastcgi.conf +++ b/templates/misc/configfiles/ubuntu_lucid/apache2/etc_apache2_mods-enabled_fastcgi.conf @@ -1,5 +1,4 @@ - FastCgiWrapper /usr/lib/apache2/suexec FastCgiIpcDir /var/run/apache2/ diff --git a/templates/misc/configfiles/ubuntu_precise/apache2/etc_apache2_mods-enabled_fastcgi.conf b/templates/misc/configfiles/ubuntu_precise/apache2/etc_apache2_mods-enabled_fastcgi.conf index 704727c5..1b226af8 100644 --- a/templates/misc/configfiles/ubuntu_precise/apache2/etc_apache2_mods-enabled_fastcgi.conf +++ b/templates/misc/configfiles/ubuntu_precise/apache2/etc_apache2_mods-enabled_fastcgi.conf @@ -1,5 +1,4 @@ - FastCgiWrapper /usr/lib/apache2/suexec FastCgiIpcDir /var/run/apache2/