View Single Post
Old 7th April 2009, 07:46
archerjd archerjd is offline
Join Date: Dec 2006
Posts: 66
Thanks: 6
Thanked 6 Times in 6 Posts

Originally Posted by Mouton View Post
I'll work on the user htaccess restriction as soon as possible.
Hi Mounton,
It seems to me that the .htaccess file even though has been used for decades , is a little messy. Would mod-auth-mysql be a cleaner/better solution?

One thing we have to keep in mind is if a user account gets disabled for some oddball reason. The .htaccess file will have to be modified and then again when the account is re-enabled. I believe if my memory serves me right, mod-auth-mysql has a variable just for things like that and it gives you the ability to use the same user accounts within the dbispconfig database.

There are some conns to this. mod-auth-mysql requires basic authentication (plain text).
Also, you would have to add something like this to the vhost.conf.master file.
<tmpl_if name='awstats' op='==' value='y'
  <Directory <tmpl_var name='web_document_root_www'>/stats
    AuthBasicAuthoritative Off
    AuthUserFile /dev/null
    AuthMySQL On
    AuthName "AWstats Service"
    AuthType Basic
    Auth_MySQL_Host localhost
    Auth_MySQL_User ispconfig
    Auth_MySQL_Password <tmpl_var name='db_password'>
    AuthMySQL_DB dbispconfig
    AuthMySQL_Password_Table ftp_user
    Auth_MySQL_Username_Field username
    Auth_MySQL_Password_Field password
    Auth_MySQL_Group_Table ftp_user
    Auth_MySQL_Group_Field gid
    Auth_MySQL_Encryption_Types Crypt
    Auth_MySQL_Empty_Passwords Off
    Auth_MySQL_Authoritative On
    Auth_MySQL_Password_Clause " AND enabled=1"
    require group <tmpl_var name='system_group'>
The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.

-- Doctor Who, "Face of Evil"

Last edited by archerjd; 7th April 2009 at 07:51.
Reply With Quote