Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
lolo888
ISPConfig 3
Commits
8eca284f
Commit
8eca284f
authored
Jan 22, 2014
by
Marius Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apache 2.4 support
- Add missing configuration inclusion (vhost files) to apache config
parent
8133de09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
install/lib/install.lib.php
install/lib/install.lib.php
+17
-0
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+9
-0
No files found.
install/lib/install.lib.php
View file @
8eca284f
...
...
@@ -666,6 +666,23 @@ function removeLine($filename, $search_pattern, $strict = 0) {
}
}
function
hasLine
(
$filename
,
$search_pattern
,
$strict
=
0
)
{
if
(
$lines
=
@
file
(
$filename
))
{
foreach
(
$lines
as
$line
)
{
if
(
$strict
==
0
)
{
if
(
stristr
(
$line
,
$search_pattern
))
{
return
true
;
}
}
else
{
if
(
trim
(
$line
)
==
$search_pattern
)
{
return
true
;
}
}
}
}
return
false
;
}
function
is_installed
(
$appname
)
{
exec
(
'which '
.
escapeshellcmd
(
$appname
)
.
' 2> /dev/null'
,
$out
,
$returncode
);
if
(
isset
(
$out
[
0
])
&&
stristr
(
$out
[
0
],
$appname
)
&&
$returncode
==
0
)
{
...
...
install/lib/installer_base.lib.php
View file @
8eca284f
...
...
@@ -1225,6 +1225,15 @@ class installer_base {
replaceLine
(
'/etc/apache2/ports.conf'
,
'Listen 443'
,
'Listen 443'
,
1
);
}
if
(
is_file
(
'/etc/apache2/apache.conf'
))
{
if
(
hasLine
(
'/etc/apache2/apache.conf'
,
'Include sites-enabled/'
,
1
)
==
false
)
{
if
(
hasLine
(
'/etc/apache2/apache.conf'
,
'IncludeOptional sites-enabled/*.conf'
,
1
)
==
false
)
{
replaceLine
(
'/etc/apache2/apache.conf'
,
'Include sites-enabled/'
,
'Include sites-enabled/'
,
1
,
1
);
}
elseif
(
hasLine
(
'/etc/apache2/apache.conf'
,
'IncludeOptional sites-enabled/*.vhost'
,
1
)
==
false
)
{
replaceLine
(
'/etc/apache2/apache.conf'
,
'IncludeOptional sites-enabled/*.vhost'
,
'IncludeOptional sites-enabled/*.vhost'
,
1
,
1
);
}
}
}
//* Copy the ISPConfig configuration include
$vhost_conf_dir
=
$conf
[
'apache'
][
'vhost_conf_dir'
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment