From a26b37c2702c72f34269ca4a770a95393971a8fd Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 20 Apr 2010 09:42:46 +0000 Subject: [PATCH] - remove 05_dirfix file when using fcgid --- .../jobs/cron_tasks.inc.http.10.apache.php | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index c8a20f34..b464aac2 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -69,16 +69,29 @@ class apache { $vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf'); - if(!isset($this->virtualhosts_data[$vhosts_filename])) + if($this->settings['system']['mod_fcgid'] == '1') { - $this->virtualhosts_data[$vhosts_filename] = ''; + // if we use fcgid we don't need this file + if(file_exists($vhosts_filename)) + { + fwrite($this->debugHandler, ' apache::_createStandardDirectoryEntry: unlinking ' . basename($vhost_filename) . "\n"); + $this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . basename($vhost_filename)); + unlink(makeCorrectFile($vhost_filename)); + } } + else + { + if(!isset($this->virtualhosts_data[$vhosts_filename])) + { + $this->virtualhosts_data[$vhosts_filename] = ''; + } - $this->virtualhosts_data[$vhosts_filename].= '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n"; - $this->virtualhosts_data[$vhosts_filename].= ' settings['system']['documentroot_prefix'] . '">' . "\n"; - $this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n"; - $this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n"; - $this->virtualhosts_data[$vhosts_filename].= ' ' . "\n"; + $this->virtualhosts_data[$vhosts_filename].= '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n"; + $this->virtualhosts_data[$vhosts_filename].= ' settings['system']['documentroot_prefix'] . '">' . "\n"; + $this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n"; + $this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n"; + $this->virtualhosts_data[$vhosts_filename].= ' ' . "\n"; + } } public function createIpPort()