Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
485
Issues
485
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
2a6eaceb
Commit
2a6eaceb
authored
Jun 22, 2010
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some awstats problems.
parent
58c2101b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
13 deletions
+16
-13
install/tpl/server.ini.master
install/tpl/server.ini.master
+1
-1
interface/web/admin/form/server_config.tform.php
interface/web/admin/form/server_config.tform.php
+1
-1
interface/web/admin/lib/lang/en_server_config.lng
interface/web/admin/lib/lang/en_server_config.lng
+1
-1
interface/web/admin/templates/server_config_web_edit.htm
interface/web/admin/templates/server_config_web_edit.htm
+2
-2
server/cron_daily.php
server/cron_daily.php
+5
-4
server/plugins-available/apache2_plugin.inc.php
server/plugins-available/apache2_plugin.inc.php
+6
-4
No files found.
install/tpl/server.ini.master
View file @
2a6eaceb
...
...
@@ -49,7 +49,7 @@ htaccess_allow_override=All
awstats_conf_dir=/etc/awstats
awstats_data_dir=/var/lib/awstats
awstats_pl=/usr/lib/cgi-bin/awstats.pl
awstats_
updateall_pl=/usr/share/doc/awstats/examples/awstats_updateall
.pl
awstats_
buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages
.pl
[dns]
bind_user=root
...
...
interface/web/admin/form/server_config.tform.php
View file @
2a6eaceb
...
...
@@ -463,7 +463,7 @@ $form["tabs"]['web'] = array (
'width'
=>
'40'
,
'maxlength'
=>
'255'
),
'awstats_
updateall
_pl'
=>
array
(
'awstats_
buildstaticpages
_pl'
=>
array
(
'datatype'
=>
'VARCHAR'
,
'formtype'
=>
'TEXT'
,
'default'
=>
''
,
...
...
interface/web/admin/lib/lang/en_server_config.lng
View file @
2a6eaceb
...
...
@@ -68,5 +68,5 @@ $wb["htaccess_allow_override_error_empty"] = '.htaccess AllowOverride is empty.'
$wb
[
"awstats_conf_dir_txt"
]
=
'awstats conf folder'
;
$wb
[
"awstats_data_dir_txt"
]
=
'awstats data folder'
;
$wb
[
"awstats_pl_txt"
]
=
'awstats.pl script'
;
$wb
[
"awstats_
updateall_pl_txt"
]
=
'awstats_updateal
l script'
;
$wb
[
"awstats_
buildstaticpages_pl_txt"
]
=
'awstats_buildstaticpages.p
l script'
;
?>
\ No newline at end of file
interface/web/admin/templates/server_config_web_edit.htm
View file @
2a6eaceb
...
...
@@ -74,8 +74,8 @@
<input
name=
"awstats_pl"
id=
"awstats_pl"
value=
"{tmpl_var name='awstats_pl'}"
size=
"40"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"awstats_
updateall_pl"
>
{tmpl_var name='awstats_updateall
_pl_txt'}
</label>
<input
name=
"awstats_
updateall_pl"
id=
"awstats_updateall_pl"
value=
"{tmpl_var name='awstats_updateall
_pl'}"
size=
"40"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
<label
for=
"awstats_
buildstaticpages_pl"
>
{tmpl_var name='awstats_buildstaticpages
_pl_txt'}
</label>
<input
name=
"awstats_
buildstaticpages_pl"
id=
"awstats_buildstaticpages_pl"
value=
"{tmpl_var name='awstats_buildstaticpages
_pl'}"
size=
"40"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
</div>
</fieldset>
...
...
server/cron_daily.php
View file @
2a6eaceb
...
...
@@ -168,19 +168,20 @@ foreach($records as $rec) {
$domain
=
escapeshellcmd
(
$rec
[
"domain"
]);
$statsdir
=
escapeshellcmd
(
$rec
[
"document_root"
]
.
'/web/stats'
);
$awstats_pl
=
$web_config
[
'awstats_pl'
];
$awstats_
updateall_pl
=
$web_config
[
'awstats_updateall
_pl'
];
$awstats_
buildstaticpages_pl
=
$web_config
[
'awstats_buildstaticpages
_pl'
];
if
(
!@
is_dir
(
$statsdir
))
mkdir
(
$statsdir
);
// awstats_buildstaticpages.pl -update -config=mydomain.com -lang=en -dir=/var/www/domain.com/web/stats -awstatsprog=/path/to/awstats.pl
$command
=
"
$awstats_
updateall
_pl
-update -config='
$domain
' -lang=en -dir='
$statsdir
' -awstatsprog='
$awstats_pl
'"
;
$command
=
"
$awstats_
buildstaticpages
_pl
-update -config='
$domain
' -lang=en -dir='
$statsdir
' -awstatsprog='
$awstats_pl
'"
;
if
(
$awstats_pl
!=
''
&&
$awstats_
updateall_pl
!=
''
&&
fileowner
(
$awstats_pl
)
==
0
&&
fileowner
(
$awstats_updateall
_pl
)
==
0
)
{
if
(
$awstats_pl
!=
''
&&
$awstats_
buildstaticpages_pl
!=
''
&&
fileowner
(
$awstats_pl
)
==
0
&&
fileowner
(
$awstats_buildstaticpages
_pl
)
==
0
)
{
exec
(
$command
);
rename
(
$rec
[
"document_root"
]
.
'/web/stats/awstats.'
.
$domain
.
'.html'
,
$rec
[
"document_root"
]
.
'/web/stats/index.html'
);
$app
->
log
(
"Created awstats statistics with command:
$command
"
,
LOGLEVEL_DEBUG
);
}
else
{
$app
->
log
(
"No awstats statistics created. Either
$awstats_pl
or
$awstats_
updateall
_pl
is not owned by root user."
,
LOGLEVEL_WARN
);
$app
->
log
(
"No awstats statistics created. Either
$awstats_pl
or
$awstats_
buildstaticpages
_pl
is not owned by root user."
,
LOGLEVEL_WARN
);
}
}
...
...
server/plugins-available/apache2_plugin.inc.php
View file @
2a6eaceb
...
...
@@ -1211,16 +1211,18 @@ class apache2_plugin {
private
function
awstats_update
(
$data
,
$web_config
)
{
global
$app
;
$awstats_conf_dir
=
$web_config
[
'awstats_conf_dir'
];
if
(
!@
is_file
(
$awstats_conf_dir
.
"/awstats."
.
$data
[
"new"
][
"domain"
]
.
".conf"
)
||
(
$data
[
"old"
][
"domain"
]
!=
''
&&
$data
[
"new"
][
"domain"
]
!=
$data
[
"old"
][
"domain"
]))
{
if
(
@
is_file
(
$awstats_conf_dir
.
"/awstats."
.
$data
[
"old"
][
"domain"
]
.
".conf"
)
)
{
unlink
(
$awstats_conf_dir
.
"/awstats."
.
$data
[
"old"
][
"domain"
]
.
".conf"
);
}
$content
=
''
;
$content
.
=
"Include
'"
.
$awstats_conf_dir
.
"/awstats.conf'
\n
"
;
$content
.
=
"LogFile=
'/var/log/ispconfig/httpd/"
.
$data
[
"new"
][
"domain"
]
.
"/access.log'
\n
"
;
$content
.
=
"SiteDomain=
'"
.
$data
[
"new"
][
"domain"
]
.
"'
\n
"
;
$content
.
=
"HostAliases=
'www."
.
$data
[
"new"
][
"domain"
]
.
" localhost 127.0.0.1'
\n
"
;
$content
.
=
"Include
\"
"
.
$awstats_conf_dir
.
"/awstats.conf
\"
\n
"
;
$content
.
=
"LogFile=
\"
/var/log/ispconfig/httpd/"
.
$data
[
"new"
][
"domain"
]
.
"/access.log
\"
\n
"
;
$content
.
=
"SiteDomain=
\"
"
.
$data
[
"new"
][
"domain"
]
.
"
\"
\n
"
;
$content
.
=
"HostAliases=
\"
www."
.
$data
[
"new"
][
"domain"
]
.
" localhost 127.0.0.1
\"
\n
"
;
file_put_contents
(
$awstats_conf_dir
.
'/awstats.'
.
$data
[
"new"
][
"domain"
]
.
'.conf'
,
$content
);
$app
->
log
(
"Created awstats config file: "
.
$awstats_conf_dir
.
'/awstats.'
.
$data
[
"new"
][
"domain"
]
.
'.conf'
,
LOGLEVEL_DEBUG
);
...
...
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