From: frank Date: Sun, 29 Jan 2012 12:11:28 +0000 (+0100) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=9616197eebdcb7d8fd6de51cfd6056fc3a865b9d;p=config%2Fuhu1%2Fetc.git committing changes in /etc after emerge run Package changes: +www-apache/mod_auth_mysql-3.0.0-r2 --- diff --git a/.etckeeper b/.etckeeper index 6f32b85..c9e74e3 100755 --- a/.etckeeper +++ b/.etckeeper @@ -61,6 +61,7 @@ maybe chmod 0644 './apache2/modules.d/00_mod_userdir.conf' maybe chmod 0644 './apache2/modules.d/00_mpm.conf' maybe chmod 0644 './apache2/modules.d/10_mod_mem_cache.conf' maybe chmod 0644 './apache2/modules.d/11_mod_auth_kerb.conf' +maybe chmod 0644 './apache2/modules.d/12_mod_auth_mysql.conf' maybe chmod 0644 './apache2/modules.d/20_mod_fastcgi.conf' maybe chmod 0644 './apache2/modules.d/40_mod_ssl.conf' maybe chmod 0644 './apache2/modules.d/45_mod_dav.conf' diff --git a/apache2/modules.d/12_mod_auth_mysql.conf b/apache2/modules.d/12_mod_auth_mysql.conf new file mode 100644 index 0000000..f33ced4 --- /dev/null +++ b/apache2/modules.d/12_mod_auth_mysql.conf @@ -0,0 +1,132 @@ + +LoadModule mysql_auth_module modules/mod_auth_mysql.so + +# mod_auth_mysql can be used to limit access to documents by checking +# data in a MySQL database. + +# This will enable user-based MySQL authentication of everything +# within /home/httpd. You'll need to do the following as the MySQL +# root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass')); +# +# +# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment +# # the following line: +# #AuthBasicAuthoritative Off +# AuthName "MySQL authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# +# require valid-user +# + +# This will enable group-based MySQL authentication of everything +# within /home/httpd. You'll need to do the following as the MySQL +# root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# user_group CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'), 'user'); +# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'), 'admin'); +# +# +# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment +# # the following line: +# #AuthBasicAuthoritative Off +# AuthName "MySQL group authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# AuthMySQLGroupField user_group +# +# require group admin +# + +# Like the above this enables group-based MySQL authentication of +# everything within /home/httpd, but this configuration allows users to +# belong to more than one group. You'll need to do the following as +# the MySQL root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# CREATE TABLE groups ( +# user_name CHAR(30) NOT NULL, +# user_group CHAR(20) NOT NULL, +# PRIMARY KEY (user_name, user_group) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# GRANT SELECT +# ON auth.groups +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass')); +# INSERT INTO groups VALUES ('testuser', 'user'); +# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass')); +# INSERT INTO groups VALUES ('testadmin', 'admin'); +# INSERT INTO groups VALUES ('testadmin', 'user'); +# +# +# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment +# # the following line: +# #AuthBasicAuthoritative Off +# AuthName "MySQL group authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# AuthMySQLGroupTable groups +# AuthMySQLGroupField user_group +# +# require group user +# + + +# vim: ts=4 filetype=apache