LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-19-2012, 11:29 PM   #1
hahacc
Member
 
Registered: Oct 2010
Posts: 93

Rep: Reputation: 1
Question awstats returns 500 internal server error only for html files


Hi guys,
I've installed awstats on centos. I can visit http://www.mysite.com/awstats/awstats.pl?config=mysite with no problem, but when I visit the static html there, it returns 500 internal server error, for example:
1)generate static html file:
perl ./awstats.pl -config=mysite -output -staticlinks > awstats.mysite.html
2)http://www.mysite.com/awstats/awstats.mysite.html returns 500 internal server error.

Here's the configuration file:
Quote:
Alias /awstats/icon/ /var/www/awstats/icon/

ScriptAlias /awstats/ /var/www/awstats/
<Directory /var/www/awstats/>
AllowOverride All
# DirectoryIndex awstats.pl
Options +ExecCGI
Order allow,deny
# Deny from all
# Allow from 127.0.0.1
Allow from all
</Directory>

#Alias /css/ /var/www/awstats/css/
#Alias /js/ /var/www/awstats/js/
Can anyone help on this please?
 
Old 05-20-2012, 12:29 AM   #2
hahacc
Member
 
Registered: Oct 2010
Posts: 93

Original Poster
Rep: Reputation: 1
ok guys, I found the answer to this problem.
from http://httpd.apache.org/docs/2.2/mod...ml#scriptalias we know that with ScriptAlias, request will be treated as CGI scripts. So when visit the html file which contains no CGI script, 500 internal server error occurs later.
Here's the working configuration:
Quote:
Alias /awstats/icon/ /var/www/awstats/icon/
Alias /awstats/ /var/www/awstats/
ScriptAlias /awstats/ /var/www/awstats/
<Directory /var/www/awstats/>
AllowOverride All
DirectoryIndex awstats.pl
Options +ExecCGI +Indexes
Order allow,deny
Allow from all
</Directory>
#Alias /css/ /var/www/awstats/css/
#Alias /js/ /var/www/awstats/js/
After this, we can visit that html file and it's 200 ok now.
Quote:
Originally Posted by hahacc View Post
Hi guys,
I've installed awstats on centos. I can visit http://www.mysite.com/awstats/awstats.pl?config=mysite with no problem, but when I visit the static html there, it returns 500 internal server error, for example:
1)generate static html file:
perl ./awstats.pl -config=mysite -output -staticlinks > awstats.mysite.html
2)http://www.mysite.com/awstats/awstats.mysite.html returns 500 internal server error.

Here's the configuration file:

Can anyone help on this please?
 
  


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
http returns 500 Internal Server Error but not https ceci2 Linux - Server 6 06-23-2010 08:04 AM
500 Internal Server Error Nagesh sheregar Linux - General 2 08-14-2009 01:52 AM
Getting 500 Internal Server Error !! Deepaks Linux - Server 0 04-11-2009 06:49 AM
500 Internal Server Error shahz Red Hat 9 03-31-2009 03:05 AM
500 Internal server error fa_khan50 Linux - Newbie 0 01-02-2008 12:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 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