View Single Post
  #13  
Old 28th January 2007, 12:11
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default AWstats and mod_perl / mod_perl2

I'll post here, as this is an issue with AWstats with dynamic pages and mod_perl. As probably most people using AWstats Dynamic with the ISPConfig panel will end up in this thread, it'll go here.

I had very inconsistent performance of awstats, most of the time identified by awstats reporting I had not used a valid user, but couple of refresh pages later I suddenly did get a page. And after clicking a submenu item, that pointed to a new page, I suddenly found myself not being a valid user anymore. Initially I though this was a bug of Firefox 2 not being able to hold credentials, but as it looks now it has to do everything with the way AWstats is running in mod_perl.
Code:
IT DOES NOT SEND THE CORRECT HEADERS!
Sorry for the capitalization, but I believe this is a serious problem of awstats and it's in there for years. I fixed the code months (years) ago on my systems , but moving to a new server and a new version pointed me again to this.

If you have mod_perl2 and Apache2 running, there's no need to mess around with the code, as there's a mod_perl directive, which can solve this issue. You need to edit the .htaccess file where awstats.pl resides. If you use the install of this thread, you'll find it at
Code:
/home/admispconfig/ispconfig/web/ispc.awstats/.htaccess
Add the following lines at the end:
Code:
<Files ~ (\.pl$)>
        PerlSendHeader On
</Files>
Presto. Now Awstats runs as expected, without throwing you out as an non-authenticated user, but yet your were.
Reply With Quote