From 8133de09d462f8221deefa29ef67877c6676d84d Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 22 Jan 2014 05:42:29 -0500
Subject: [PATCH] Added: apache version check in system library Changed: apps vhost is now a template (for apache version) Changed: template if tags can now be of format 'version' to make version comparisons (e.g. 2.12 > 2.2 !) Changed: New apache 2.4 syntax for deny from all (-> Require all denied) etc.
---
server/plugins-available/apache2_plugin.inc.php | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 4007a7d..0901c23 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -930,6 +930,7 @@
}
$tpl->setVar($vhost_data);
+ $tpl->setVar('apache_version', $app->system->getapacheversion());
// Rewrite rules
$rewrite_rules = array();
@@ -1136,6 +1137,7 @@
$fcgi_tpl = new tpl();
$fcgi_tpl->newTemplate('php-fcgi-starter.master');
+ $fcgi_tpl->setVar('apache_version', $app->system->getapacheversion());
// Support for multiple PHP versions (FastCGI)
if(trim($data['new']['fastcgi_php_version']) != ''){
@@ -1275,6 +1277,7 @@
$cgi_tpl = new tpl();
$cgi_tpl->newTemplate('php-cgi-starter.master');
+ $cgi_tpl->setVar('apache_version', $app->system->getapacheversion());
// This works because PHP "rewrites" a symlink to the physical path
$php_open_basedir = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir'];
@@ -1909,6 +1912,7 @@
$tpl = new tpl();
$tpl->newTemplate('apache_ispconfig.conf.master');
+ $tpl->setVar('apache_version', $app->system->getapacheversion());
$records = $app->db->queryAllRecords('SELECT * FROM server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'");
$records_out= array();
@@ -2609,7 +2613,8 @@
$app->load('tpl');
$tpl = new tpl();
$tpl->newTemplate('php_fpm_pool.conf.master');
-
+ $tpl->setVar('apache_version', $app->system->getapacheversion());
+
if($data['new']['php_fpm_use_socket'] == 'y'){
$use_tcp = 0;
$use_socket = 1;
--
Gitblit v1.9.1