Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just finish to install awstats on my web server, and it runs fine using firefox. But when I try to open the awstats page with chrome, the perl source script is downloaded (instead of being executed). it seems the MIME requested by Chrome gave a different behavior compared to Chrome. Any idea ?

Interesting part of the Apache configuration file:

<Directory "/var/www/cryptis-https-root/admin-awstats">
  Options Indexes FollowSymLinks MultiViews  ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from X.Y
</Directory>

Alias /awstatsclasses "/var/www/awstats/wwwroot/classes/"
Alias /awstatscss "/var/www/awstats/wwwroot/css/"
Alias /awstatsicons "/var/www/awstats/wwwroot/icon/"
ScriptAlias /admin-awstats/ "/var/www/awstats/wwwroot/cgi-bin/"

<Directory "/var/www/awstats/wwwroot">
  Options None ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from X.Y
</Directory>

I've tried to add the following line in the apache configuration file but it has no effect:

AddHandler cgi-script .pl
share|improve this question
add comment

2 Answers

Can you try this:

<Directory "/var/www/awstats/wwwroot/cgi-bin/">
  Options +ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from X.Y
</Directory>

Alias /awstatsclasses "/var/www/awstats/wwwroot/classes/"
Alias /awstatscss "/var/www/awstats/wwwroot/css/"
Alias /awstatsicons "/var/www/awstats/wwwroot/icon/"
ScriptAlias /admin-awstats/ "/var/www/awstats/wwwroot/cgi-bin/"

<Directory "/var/www/awstats/wwwroot">
  Options None
  AllowOverride None
  Order allow,deny
  Allow from X.Y
</Directory>
share|improve this answer
add comment

Out of curiosity. Are you sure that it is echoing the Perl source code in Chrome? Or is it that chrome is unable to render the response? The latter would be caused by missing MIME type.

share|improve this answer
    
No, apache really sends the whole Perl source code (hopefully critical code in it) –  Kartoch Jan 10 '11 at 22:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.