mod_auth_mysql apache - multiple tables?
bryan
bryan at redfedora.co.uk
Thu Apr 29 21:30:09 UTC 2010
Hi All
This is my first foray into mod_auth_mysql with apache. I'm trying to
get some things straight in my own mind, so would be grateful if someone
could tell me whether I have this figured out right...
I'm going to have multiple people connecting to httpd, but I need to
restrict access so that only certain groups can see certain data.
The thinking goes as follows: -
/var/www/html/acme
/var/www/html/widget
only acme accesses acme and widget, widget
I'm assuming I can create an acme table and a widget table and then
alter /etc/httpd/conf.d/mod_auth_mysql.conf file to reflect each group
in multiple instances in that file...
<Directory /var/www/html/acme>
AuthName "MySQL group authenticated zone"
AuthType Basic
AuthMYSQLEnable on
AuthMySQLUser authuser
AuthMySQLPassword PaSsW0Rd
AuthMySQLDB acme
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
AuthMySQLGroupField user_group
require group acme
</Directory>
<Directory /var/www/html/widget>
AuthName "MySQL group authenticated zone"
AuthType Basic
AuthMYSQLEnable on
AuthMySQLUser authuser
AuthMySQLPassword PaSsW0Rd
AuthMySQLDB widget
AuthMySQLUserTable users
AuthMySQLNameField user_name
AuthMySQLPasswordField user_passwd
AuthMySQLGroupField user_group
require group widget
</Directory>
If someone could tell me my thinking is correct and this would work I'd
be extremely grateful, likewise if my thinking is wrong! a working
example or two would also be gratefully received.
Thanks
Bryan
More information about the users
mailing list