LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-24-2006, 06:15 AM   #1
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Rep: Reputation: 0
Awstats problem


Hi, Iīve a problem with an awstats 6.5 installation, I installed it on
a Suse 9.0 with an Apache 2.0 web server...but when I open the url I only see the script's source code...

Could you help me?.

Thank you.
 
Old 12-25-2006, 02:59 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
What steps did you follow to set it up? Did you run awstats_configure.pl? Do you have the required directives in your httpd.conf file (please see http://awstats.sourceforge.net/docs/awstats_setup.html for more info):
Code:
#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path "/usr/local/awstats/" must reflect your AWStats Installation path.
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
  Options None
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>
 
Old 12-26-2006, 01:47 AM   #3
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
re:

Hi gilead, I've the same code as you in my httpd.conf and I only see the source code when I open http://localhost/awstats/awstats.pl?config=localhost...

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

thank you for your support
 
Old 12-26-2006, 02:52 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That's odd... Are executable permissions set on /usr/local/awstats/wwwroot/cgi-bin/awstats.pl?
 
Old 12-26-2006, 03:07 AM   #5
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
re

hi again, can you tell me how to do that?, I havenīt got experience on linux...

Thank you very much
 
Old 12-26-2006, 04:22 AM   #6
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
RE:permissions

Hi gilead, the scripś permissions are:

-rwxr-xr-x 1 root root 544952 Dec 22 12:12 awstats.pl

is it right?

it still don't run...

cheers
 
Old 12-26-2006, 04:35 AM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
On the box I'm working on at the moment, ls -l /usr/local/awstats/wwwroot/cgi-bin/awstats.pl shows the following:
Code:
-rwxr-xr-x 1 root root 547739 2006-09-17 09:24 /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
The commands to set this are run as root:
Code:
chmod -c 0755 /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
chown -c root:root /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
If you prefer only your apache user (or whoever Apache runs as) to have permission:
Code:
chmod -c 0750 /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
chown -c apache:apache /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
 
Old 12-26-2006, 04:39 AM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Yes your permissions are correct. Can you try running the script from the command line as a normal user? If it runs then the problem is with the Apache set up. If it doesn't run, can you post the error here?

It might be that your perl executable isn't were the script thinks it is. For example the first line of /usr/local/awstats/wwwroot/cgi-bin/awstats.pl is #!/usr/bin/perl - is your perl executable in /usr/bin/perl?
 
Old 12-26-2006, 05:03 AM   #9
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
re:

yes, the perl executable is in usr/bin...
if I build the static reports with:
perl awstats.pl -config=localhost -output -staticlinks > awstats.localhost.html

it builds the html page correctly...
 
Old 12-26-2006, 05:09 AM   #10
muabdib
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
apache error.log

[Tue Dec 26 08:51:28 2006] [notice] Apache/2.0.52 (Unix) mod_jk/1.2.6 configured -- resuming normal operations
[Tue Dec 26 08:51:45 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:54:27 2006] [error] [client 127.0.0.1] File does not exist: /usr/local/awstats/wwwroot/cgi-bin/wwwroot
[Tue Dec 26 08:54:27 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:54:44 2006] [error] [client 127.0.0.1] File does not exist: /usr/local/awstats/wwwroot/cgi-bin/wwwroot
[Tue Dec 26 08:54:44 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:54:56 2006] [error] [client 127.0.0.1] File does not exist: /usr/local/awstats/wwwroot/cgi-bin/wwwroot
[Tue Dec 26 08:54:56 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:55:00 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:56:26 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 08:56:29 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 09:17:21 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 09:51:05 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:32:37 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:32:47 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:32:53 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:33:03 2006] [error] [client 127.0.0.1] Attempt to serve directory: /usr/local/awstats/wwwroot/cgi-bin/
[Tue Dec 26 11:33:03 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:33:19 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:53:05 2006] [notice] caught SIGTERM, shutting down
[Tue Dec 26 11:53:59 2006] [notice] Apache/2.0.52 (Unix) mod_jk/1.2.6 configured -- resuming normal operations
[Tue Dec 26 11:54:04 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 11:54:12 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico
[Tue Dec 26 12:06:17 2006] [error] [client 127.0.0.1] File does not exist: /opt/ame/ameinfra/apache/htdocs/favicon.ico


thank you again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AWstats Report problem pikky2006 Linux - Software 1 08-01-2006 11:04 AM
Awstats problem gerilaradio Slackware 2 01-03-2006 05:27 AM
Awstats : update problem gerilaradio Slackware 1 01-03-2006 04:14 AM
Problem with awstats Tamara Linux - General 2 11-04-2005 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration