From e6d68c2eb0d0b4e28a627405678a693026e92482 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 06 Mar 2009 12:33:28 -0500
Subject: [PATCH] Several improvements for opensuse.

---
 server/conf/vhost.conf.master                   |    2 +-
 server/plugins-available/apache2_plugin.inc.php |    1 +
 install/dist/lib/opensuse.lib.php               |    2 +-
 docs/INSTALL_OPENSUSE_11_1.txt                  |    6 +++++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/docs/INSTALL_OPENSUSE_11_1.txt b/docs/INSTALL_OPENSUSE_11_1.txt
index 611c338..3fbd04d 100644
--- a/docs/INSTALL_OPENSUSE_11_1.txt
+++ b/docs/INSTALL_OPENSUSE_11_1.txt
@@ -82,7 +82,9 @@
 
 2.1) Install apache2
 
-yast2 -i apache2
+yast2 -i apache2 apache2-mod_fcgid
+
+rpm -i http://download.opensuse.org/repositories/server:/php/server_database_apache_openSUSE_11.0/i586/suphp-0.6.2-10.41.i586.rpm
 
 3) Install PHP5 modules (1 line!):
 
@@ -94,6 +96,8 @@
 a2enmod rewrite
 a2enmod ssl
 a2enmod actions
+a2enmod suphp
+a2enmod fcgid
 
 chkconfig --add apache2
 /etc/init.d/apache2 start
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 043a822..25e1037 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -435,7 +435,7 @@
 		
 		$content = rf('/etc/apache2/httpd.conf');
 		if(!stristr($content,'Include /etc/apache2/sites-enabled/')) {
-			af('/etc/apache2/httpd.conf',"\nInclude /etc/apache2/sites-enabled/\n\n");
+			af('/etc/apache2/httpd.conf',"\n<Directory /srv/www>\n    Options FollowSymlinks\n</Directory>\n\nInclude /etc/apache2/sites-enabled/\n\n");
 		}
 		unset($content);
 		
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index b0fd8e5..22a05c0 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -1,5 +1,5 @@
 
-<Directory /var/www/{tmpl_var name='domain'}>
+<Directory {tmpl_var name='web_basedir'}/{tmpl_var name='domain'}>
     AllowOverride None
     Order Deny,Allow
     Deny from all
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index aa8e189..97bcee0 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -447,6 +447,7 @@
 		$vhost_data = $data["new"];
 		$vhost_data["web_document_root"] = $data["new"]["document_root"]."/web";
 		$vhost_data["web_document_root_www"] = $web_config["website_basedir"]."/".$data["new"]["domain"]."/web";
+		$vhost_data["web_basedir"] = $web_config["website_basedir"];
 		
 		// Check if a SSL cert exists
 		$ssl_dir = $data["new"]["document_root"]."/ssl";

--
Gitblit v1.9.1