1

Topic: Awstats won't load [SOLVED]

Have been attempting to load awstats in my web browser when I receive a 500 internal server error. Checked the error logs and this is what shows "configuration error:  couldn't perform authentication. AuthType not set!: /awstats/awstats.pl"

Checked the awstats.conf file don not find anything in there.

Running on Freebsd 8

Thanks

Darrell

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Awstats won't load [SOLVED]

Could you please paste awstats.conf here? (HIDE sensitive information before post)

3

Re: Awstats won't load [SOLVED]

LogFile="/var/log/httpd-access.log"
LogType=W
LogFormat=1
LogSeparator=" "
SiteDomain="www.xxxxx.com"
HostAliases="localhost 127.0.0.1 REGEX[myserver\.com$]"
DNSLookup=2
DirData="."
DirCgi="/cgi-bin"
DirIcons="/awstatsicons"
AllowToUpdateStatsFromBrowser=0
AllowFullYearView=2
EnableLockForUpdate=0
DNSStaticCacheFile="dnscache.txt"
DNSLastUpdateCacheFile="dnscachelastupdate.txt"
SkipDNSLookupFor=""
AllowAccessFromWebToAuthenticatedUsersOnly=0
AllowAccessFromWebToFollowingAuthenticatedUsers=""
AllowAccessFromWebToFollowingIPAddresses=""
CreateDirDataIfNotExists=0
BuildHistoryFormat=text
BuildReportFormat=html
SaveDatabaseFilesWithPermissionsForEveryone=0
PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=0
DefaultFile="index.php index.html"
SkipHosts=""
SkipUserAgents=""
SkipFiles=""
SkipReferrersBlackList=""
OnlyHosts=""
OnlyUserAgents=""
OnlyUsers=""
OnlyFiles=""
NotPageList="css js class gif jpg jpeg png bmp ico rss xml swf"
ValidHTTPCodes="200 304"
ValidSMTPCodes="1 250"
AuthenticatedUsersNotCaseSensitive=0
URLNotCaseSensitive=0

This isn't all of it but I think this is all you will need

Thanks for looking at this

4

Re: Awstats won't load [SOLVED]

I have the same problem, there is no AuthType set in /usr/local/etc/apache22/Includes/awstats.conf file.
OS: FreeBSD 8.0

configuration error:  couldn't perform authentication. AuthType not set!: /awstats/awstats.pl

rein

5

Re: Awstats won't load [SOLVED]

I'm so sorry that i didn't check iRedMail source file before, and i found this is a bug in iRedMail on FreeBSD.

I will fix it later and give you a solution to fix them. Thanks for your report. smile

You guys must be using MySQL backend, right?

6

Re: Awstats won't load [SOLVED]

Try to add below code in /usr/local/etc/apache22/Includes/awstats.conf:

    AuthType Basic

    AuthMYSQLEnable on
    AuthMySQLUser vmail
    AuthMySQLPassword 'REPLACE_VMAIL_PASSWORD_HERE'
    AuthMySQLDB vmail
    AuthMySQLUserTable admin
    AuthMySQLNameField username
    AuthMySQLPasswordField password

Or below code:

AuthType Basic
require valid-user
AuthMySQLEnable On
AuthMySQLHost localhost
AuthMySQLUser vmail
AuthMySQLPassword 'REPLACE_YOUR_VMAIL_PASSWORD_HERE'
AuthMySQLDB vmail
AuthMySQLUserTable admin
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLPwEncryption md5
AuthMySQLAuthoritative On

7

Re: Awstats won't load [SOLVED]

dbetts22 & ZhangHuangbin,

This is how i made mine work on Freebsd 8.0

First thing to be noted is that the iredmail install script will not install "mod_auth_mysql", so it needs to be manually installed or else the Auth_x will not work at all.

cd /usr/ports/www/mod_auth_mysql2/ && make install clean

Add into /usr/local/etc/apache22/httpd.conf under the Load Modules section:
LoadModule auth_mysql_module  libexec/apache22/mod_auth_mysql.so (be mindful of the apache22)

And exactly what ZhangHuangbin has shown  in  /usr/local/etc/apache22/Includes/awstats.conf:
But my setup was giving the following error:

"Syntax error on line 33 of /usr/local/etc/apache22/Includes/awstats.conf:
Invalid command 'AuthMySQLNameField', perhaps misspelled or defined by a module not included in the server configuration"

Since i am testing this setup therefore i commented the two lines:
#    AuthMySQLNameField username
#    AuthMySQLPasswordField password

So far i have not been able to get the authentication to work but pointing your browser to awstats URL works.

Hope, i was of some help smile

rein

8

Re: Awstats won't load [SOLVED]

@rein, Thanks very much.

I missed port www/mod_auth_mysql2 in iRedMail. Since i'm a little busy now, i have to fix it later.
If someone can donate us a VPS should help a lot, so that i don't need to install lots of VMs on my laptop.

9

Re: Awstats won't load [SOLVED]

Hi,

I found this yesterday after trying to debug why when the:

#    AuthMySQLNameField username
#    AuthMySQLPasswordField password

statements within awstats.conf was causing apache to spew error whilst restarting.

Found out that  for FreeBSD 8, if you install :

/usr/ports/www/mod_auth_mysql2/

The functionality of some of the AuthMYSQLXXX parameters are disabled or apache will error out when reloading.

But for the other functionality to work,like:

AuthMySQlNameField              
AuthMySQLPasswordField          
AuthMySQLPwEncryption   

       

you will have to install this:

/usr/ports/www/mod_auth_mysql_another

I am just curious here, even reading the INSTALL and BUILD files, it rather seems that mod_auth_mysql_another would give you the total functionality of the AuthMYSQLXXX than just mod_auth_mysql2. Read through the INSTALL and BUILD docs of each.

Hope you choose the right port for that now.Hope i have been of some help. smile

rein

10

Re: Awstats won't load [SOLVED]

AuthMySQLPassword 'REPLACE_YOUR_VMAIL_PASSWORD_HERE'
What is the password for the vmail user in mysql? It appears to be encrypted

11

Re: Awstats won't load [SOLVED]

vmail password was random create duiring iredmail install.you can find the password in /etc/postfix/ldap_virtual_mailbox_domains.cf

cat /etc/postfix/ldap_virtual_mailbox_domains.cf 

12

Re: Awstats won't load [SOLVED]

Fixed this issue moment ago:
http://code.google.com/p/iredmail/sourc … 96d56803d8

Thanks dbetts22 smile