From 9fcf88d06d20076f1b228979e9ed4e8a56f39ef8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 26 Oct 2010 10:28:10 -0400
Subject: [PATCH] Fixed: FS#1388 - Namevirtualhost directive is missing after update. 2nd try ;)
---
server/plugins-available/apache2_plugin.inc.php | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 135f549..5ba9add 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -927,7 +927,7 @@
$web_config = $app->getconf->get_server_config($conf["server_id"], 'web');
//* Check if this is a chrooted setup
- if($web_config['website_basedir'] != '' && @is_file($web_config['/var/www'].'/etc/passwd')) {
+ if($web_config['website_basedir'] != '' && @is_file($web_config['website_basedir'].'/etc/passwd')) {
$apache_chrooted = true;
} else {
$apache_chrooted = false;
@@ -1246,7 +1246,8 @@
/*
* add all the webdav-dirs to the webdav-section
*/
- $files = scandir($webdavRoot);
+ $files = @scandir($webdavRoot);
+ if(is_array($files)) {
foreach($files as $file) {
if (substr($file, strlen($file) - strlen('.htdigest')) == '.htdigest') {
/*
@@ -1254,8 +1255,8 @@
*/
$fn = substr($file, 0, strlen($file) - strlen('.htdigest'));
$output .= "\n";
- $output .= " Alias /" . $fn . " " . $webdavRoot . "/" . $fn . "\n";
- $output .= " <Location /" . $fn . ">\n";
+ $output .= " Alias /webdav/" . $fn . ' ' . $webdavRoot . '/' . $fn . "\n";
+ $output .= " <Location /webdav/" . $fn . ">\n";
$output .= " DAV On\n";
$output .= " AuthType Digest\n";
$output .= " AuthName \"" . $fn . "\"\n";
@@ -1267,6 +1268,7 @@
$output .= " </Location> \n";
}
}
+ }
}
/*
* is the "replace-comment-end" found...
--
Gitblit v1.9.1