awstats returns 500 internal server error onl

Anonymous
2012-05-20
2012-10-11
  • Anonymous

    Anonymous - 2012-05-20

    Hi guys,
    I've installed awstats on centos. I can visit http://www.mysite.com/awstats/a
    wstats.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:

    Alias /awstats/icon/ /var/www/awstats/icon/
    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/
    

    Can anyone help on this please?

     
  • Anonymous

    Anonymous - 2012-05-20

    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:

    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.

     

Log in to post a comment.