Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
320e4e84
Commit
320e4e84
authored
Aug 18, 2011
by
tbrehm
Browse files
Added missing aliasdomains in awstats config file.
parent
2307971c
Changes
1
Show whitespace changes
Inline
Side-by-side
server/cron_daily.php
View file @
320e4e84
...
...
@@ -177,11 +177,21 @@ foreach($records as $rec) {
if
(
is_file
(
$awstats_website_conf_file
))
unlink
(
$awstats_website_conf_file
);
$sql
=
"SELECT domain FROM web_domain WHERE (type = 'alias' OR AND type = 'subdomain') server_id = "
.
$conf
[
'server_id'
];
$aliases
=
$app
->
db
->
queryAllRecords
(
$sql
);
$aliasdomain
=
''
;
if
(
is_array
(
$aliases
))
{
foreach
(
$aliases
as
$alias
)
{
$aliasdomain
.
=
' '
.
$alias
[
'domain'
]
.
' www.'
.
$alias
[
'domain'
];
}
}
if
(
!
is_file
(
$awstats_website_conf_file
))
{
$awstats_conf_file_content
=
'Include "'
.
$awstats_conf_dir
.
'/awstats.conf"
LogFile="/var/log/ispconfig/httpd/'
.
$domain
.
'/yesterday-access.log"
SiteDomain="'
.
$domain
.
'"
HostAliases="www.'
.
$domain
.
' localhost 127.0.0.1"'
;
HostAliases="www.'
.
$domain
.
' localhost 127.0.0.1"'
.
$aliasdomain
;
file_put_contents
(
$awstats_website_conf_file
,
$awstats_conf_file_content
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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