From b9dbe75a8d7d022f32ed35fde566c9399f8f1aa9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 20 Jan 2009 05:53:10 -0500
Subject: [PATCH] Fixed: When an SSL web site is created, configure Apache automatically to listen on port 443, if it is not already listening on that port.
---
install/lib/installer_base.lib.php | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 4b73a1e..ea4e382 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -701,6 +701,17 @@
replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0);
}
+ if(is_file('/etc/apache2/sites-enabled/000-default')) {
+ replaceLine('/etc/apache2/sites-available/000-default','NameVirtualHost *','NameVirtualHost *:80',1);
+ replaceLine('/etc/apache2/sites-available/000-default','<VirtualHost *>','<VirtualHost *:80>',1);
+ }
+
+ if(is_file('/etc/apache2/ports.conf')) {
+ // add a line "Listen 443" to ports conf if line does not exist
+ replaceLine('/etc/apache2/ports.conf','Listen 443','Listen 443',1);
+ }
+
+
//* Copy the ISPConfig configuration include
$vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
--
Gitblit v1.9.1