4. Additional modules

4.1. mod_dav

4.1.3. Building and installing

cd /usr/local

tar -xvzf mod_dav-1.0.3-1.3.6.tar.gz
cd mod_dav-1.0.3-1.3.6

./configure --with-apxs=/usr/local/apache/bin/apxs

make
make install

Notice: the filename mod_dav-1.0.3-1.3.6 suggests that it will only run with apache 1.3.6 but it actually will run with all apaches >= 1.3.6

4.2. auth_ldap

4.2.3. Building and installing

cd /usr/local

tar -xvzf auth_ldap-1.6.0.tar.gz

cd auth_ldap-1.6.0

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-sdk=openldap

make
make install

4.3. mod_auth_mysql

4.3.3. Building and installing

gunzip mod_auth_mysql.c.gz

/usr/local/apache/bin/apxs \
-c -I/usr/local/mysql/include \
-L/usr/local/mysql/lib/mysql \
-lmysqlclient -lm mod_auth_mysql.c

cp mod_auth_mysql.so /usr/local/apache/libexec/

Add this line in your httpd.conf:

LoadModule mysql_auth_module libexec/mod_auth_mysql.so

And where the other modules are added:

AddModule mod_auth_mysql.c

Take care that the path of Mysql libs and includes are correct!

Notice: Be sure that /usr/local/mysql/lib/mysql is in /etc/ld.so.conf before compiling

Use AuthMySQLCryptedPasswords Off or it does not work! (under investigation why not)

4.3.4. Sample configuration

4.3.4.1. /usr/local/apache/conf/httpd.conf

<location /manual/>
  AuthType Basic
  AuthUserfile /dev/null
  AuthName Testing
  AuthGroupFile /dev/null
  AuthMySQLHost localhost
  AuthMySQLCryptedPasswords Off
  AuthMySQLUser root
  AuthMySQLDB users
  AuthMySQLUserTable user_info
  <Limit GET POST>
    require valid-user
  </limit>
</location>

4.3.4.2. Script for creating the MySQL-Database

just type:

mysql < authmysql.sql

The File authmysql.sql contents:

  create database http_users;
  connect http_users;

  CREATE TABLE user_info (
  user_name CHAR(30) NOT NULL,
  user_passwd CHAR(20) NOT NULL,
  user_group CHAR(10),
  PRIMARY KEY (user_name);

4.4. mod_dynvhost

4.4.3. Building and installing

cd /usr/local

tar -xvzf mod_dynvhost.tar.gz

cd dynvhost/

/usr/local/apache/bin/apxs -i -a -c mod_dynvhost.c

Notice: Take a look at httpd.conf if mod_dynvhost.so is loaded at startup:

LoadModule dynvhost_module libexec/mod_dynvhost.so

4.5. mod_roaming

4.5.3. Building and installing

cd /usr/local 

tar -xvzf mod_roaming-1.0.2.tar.gz

cd mod_roaming-1.0.2

/usr/local/apache/bin/apxs -i -a -c mod_roaming.c

Notice: Check httpd.conf if mod_roaming is loaded at startup:

LoadModule roaming_module libexec/mod_roaming.so

Should be installed automatically

4.5.4. Sample configuration

4.5.4.1. /usr/local/apache/conf/httpd.conf

RoamingAlias /roaming /usr/local/apache/roaming
<Directory /usr/local/apache/roaming>
  AuthUserFile /usr/local/apache/conf/roaming-htpasswd
  AuthType Basic
  AuthName "Roaming Access"
  <Limit GET PUT MOVE DELETE>
    require valid-user
  </Limit>
</Directory>