Skip to content

Commit 39e5f01

Browse files
author
Till Brehm
committed
Fixed a issue with apache 2.4 support on Ubuntu 13.10
1 parent dc9e64c commit 39e5f01

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,10 +1243,20 @@ public function configure_apache() {
12431243

12441244
if(is_file('/etc/apache2/apache.conf')) {
12451245
if(hasLine('/etc/apache2/apache.conf', 'Include sites-enabled/', 1) == false) {
1246-
if(hasLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/*.conf', 1) == false) {
1246+
if(hasLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/*.conf', 1) == false && hasLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/', 1) == false) {
12471247
replaceLine('/etc/apache2/apache.conf', 'Include sites-enabled/', 'Include sites-enabled/', 1, 1);
12481248
} elseif(hasLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/*.vhost', 1) == false) {
1249-
replaceLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/*.vhost', 'IncludeOptional sites-enabled/*.vhost', 1, 1);
1249+
replaceLine('/etc/apache2/apache.conf', 'IncludeOptional sites-enabled/*.vhost', 'IncludeOptional sites-enabled/', 1, 1);
1250+
}
1251+
}
1252+
}
1253+
1254+
if(is_file('/etc/apache2/apache2.conf')) {
1255+
if(hasLine('/etc/apache2/apache2.conf', 'Include sites-enabled/', 1) == false && hasLine('/etc/apache2/apache2.conf', 'IncludeOptional sites-enabled/', 1) == false) {
1256+
if(hasLine('/etc/apache2/apache2.conf', 'IncludeOptional sites-enabled/*.conf', 1) == true) {
1257+
replaceLine('/etc/apache2/apache2.conf', 'Include sites-enabled/', 'Include sites-enabled/', 1, 1);
1258+
} elseif(hasLine('/etc/apache2/apache2.conf', 'IncludeOptional sites-enabled/*.conf', 1) == true) {
1259+
replaceLine('/etc/apache2/apache2.conf', 'IncludeOptional sites-enabled/*.conf', 'IncludeOptional sites-enabled/', 1, 1);
12501260
}
12511261
}
12521262
}

install/tpl/apache_ispconfig.conf.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
104104
</tmpl_if>
105105
</Directory>
106106

107+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
107108
Alias /awstats-icon "/usr/share/awstats/icon"
109+
</tmpl_if>
108110

109111
NameVirtualHost *:80
110112
NameVirtualHost *:443

server/conf/apache_ispconfig.conf.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
104104
</tmpl_if>
105105
</Directory>
106106

107+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
107108
Alias /awstats-icon "/usr/share/awstats/icon"
109+
</tmpl_if>
108110

109111
NameVirtualHost *:80
110112
NameVirtualHost *:443

0 commit comments

Comments
 (0)