old-www/HOWTO/Apache-Compile-HOWTO/modules.html

1089 lines
15 KiB
HTML

<HTML
><HEAD
><TITLE
>Additional modules</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Apache Compile HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Getting, build and install Apache with its basic modules"
HREF="apache.html"><LINK
REL="NEXT"
TITLE="Compressed delivery"
HREF="compress.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Apache Compile HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="apache.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="compress.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="MODULES"
></A
>4. Additional modules</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN446"
></A
>4.1. mod_dav</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN448"
></A
>4.1.1. What is mod_dav</H3
><A
NAME="AEN450"
></A
><TABLE
BORDER="0"
WIDTH="100%"
CELLSPACING="0"
CELLPADDING="0"
CLASS="BLOCKQUOTE"
><TR
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
><TD
WIDTH="80%"
VALIGN="TOP"
><P
>mod_dav is an Apache module to provide <SPAN
CLASS="ABBREV"
>DAV</SPAN
> capabilities (<SPAN
CLASS="ABBREV"
>RFC</SPAN
> 2518)
for your Apache web server. It is an Open Source module, provided under an Apache-style license.</P
></TD
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="RIGHT"
VALIGN="TOP"
>--<SPAN
CLASS="ATTRIBUTION"
>www.webdav.org</SPAN
></TD
><TD
WIDTH="10%"
>&nbsp;</TD
></TR
></TABLE
><P
>From the authors point of view:</P
><P
><SPAN
CLASS="ABBREV"
>DAV</SPAN
> means: »Distributed authoring and Versioning«. It allows you to manage your Website similar
to a filesystem. It is meant to replace ftp-uploads to your webserver.</P
><P
><SPAN
CLASS="ABBREV"
>DAV</SPAN
> is supported by all major web development tools (newer versions) and is going to be a widely accepted
standard for webpublishing.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN460"
></A
>4.1.2. Download the source</H3
><P
>Origin-Site: <A
HREF="http://www.webdav.org/mod_dav/"
TARGET="_top"
>http://www.webdav.org/mod_dav/</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN464"
></A
>4.1.3. Building and installing</H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>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</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Confusing filename</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>The filename <TT
CLASS="FILENAME"
>mod_dav-1.0.3-1.3.6</TT
> suggests that it will only run with Apache 1.3.6 but it
actually will run with all Apaches &#62;= 1.3.6</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN471"
></A
>4.2. auth_ldap</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN473"
></A
>4.2.1. What is auth_ldap</H3
><A
NAME="AEN475"
></A
><TABLE
BORDER="0"
WIDTH="100%"
CELLSPACING="0"
CELLPADDING="0"
CLASS="BLOCKQUOTE"
><TR
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
><TD
WIDTH="80%"
VALIGN="TOP"
><P
>auth_ldap is an LDAP authentication module for Apache, the world's most popular web server.
auth_ldap has excellent performance, and supports Apache on both Unix and Windows NT. It
also has support for LDAP over SSL, and a mode that lets <SPAN
CLASS="APPLICATION"
>Frontpage</SPAN
> clients manage
their web permissions while still using <SPAN
CLASS="ACRONYM"
>LDAP</SPAN
> for authentication. </P
></TD
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="RIGHT"
VALIGN="TOP"
>--<SPAN
CLASS="ATTRIBUTION"
>www.rudedog.org</SPAN
></TD
><TD
WIDTH="10%"
>&nbsp;</TD
></TR
></TABLE
><P
>From the authors point of view:</P
><P
>If you like to consolidate your login-facilities to a common user/passwd base, <SPAN
CLASS="ACRONYM"
>LDAP</SPAN
>
(Lightweight Directory Access Protocol) is the right way. <SPAN
CLASS="ACRONYM"
>LDAP</SPAN
> is an open standard and widely supported.</P
><P
>Login-facilities for <SPAN
CLASS="ACRONYM"
>LDAP</SPAN
>:</P
><P
>Unix-Logins for <SPAN
CLASS="APPLICATION"
>Linux</SPAN
>, <SPAN
CLASS="APPLICATION"
>Solaris</SPAN
>
(others?) FTP-Logins (some ftp-daemons) http Basic Authentication <SPAN
CLASS="APPLICATION"
>Tarantella</SPAN
>
Authentication and Role-Management <SPAN
CLASS="APPLICATION"
>Samba</SPAN
> Authentication (2.2.x should support this)
<SPAN
CLASS="ACRONYM"
>LDAP</SPAN
> is role based. That means, i.e. you can define a role »manager« assign a user as
member and that user can login wherever a manager is allowed to login.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN492"
></A
>4.2.2. Download the source</H3
><P
>Origin-Site: <A
HREF="http://www.rudedog.org/auth_ldap/"
TARGET="_top"
>http://www.rudedog.org/auth_ldap/</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN496"
></A
>4.2.3. Building and installing</H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>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</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AUTHMYSQL"
></A
>4.3. mod_auth_mysql</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN501"
></A
>4.3.1. What is mod_auth_mysql</H3
><P
>It is a http-Basic Authentication Module. It allows to maintain your user comfortable in a MySQL-Database</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN504"
></A
>4.3.2. Download the source</H3
><P
>Origin-Site: <A
HREF="ftp://ftp.kciLink.com/pub/mod_auth_mysql.c.gz"
TARGET="_top"
>ftp://ftp.kciLink.com/pub/mod_auth_mysql.c.gz</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN508"
></A
>4.3.3. Building and installing</H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>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/</PRE
></FONT
></TD
></TR
></TABLE
><P
>Add this line in your <TT
CLASS="FILENAME"
>httpd.conf</TT
>:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LoadModule mysql_auth_module libexec/mod_auth_mysql.so</PRE
></FONT
></TD
></TR
></TABLE
><P
>And where the other modules are added:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>AddModule mod_auth_mysql.c</PRE
></FONT
></TD
></TR
></TABLE
><P
>Take care that the path of MySQL libraries and includes are correct.</P
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Library path</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Be sure that /usr/local/mysql/lib/mysql is in /etc/ld.so.conf before compiling</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN520"
></A
>4.3.4. Sample configuration</H3
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN522"
></A
><P
><B
>Example 1. /usr/local/apache/conf/httpd.conf</B
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>&#60;location /manual/&#62;
AuthType Basic
AuthUserfile /dev/null
AuthName Testing
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLCryptedPasswords Off
AuthMySQLUser root
AuthMySQLDB users
AuthMySQLUserTable user_info
&#60;Limit GET POST&#62;
require valid-user
&#60;/limit&#62;
&#60;/location&#62;</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN525"
></A
>4.3.4.1. Script for creating the MySQL-Database</H4
><P
>just type:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>mysql &#60; authmysql.sql</PRE
></FONT
></TD
></TR
></TABLE
><P
>The File authmysql.sql contents:</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN530"
></A
><P
><B
>Example 2. authmysql.sql</B
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> 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);</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN533"
></A
>4.4. mod_dynvhost</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN535"
></A
>4.4.1. What is mod_dynvhost</H3
><P
>It is a module that allows to define new Virtual Host "on-the-fly". Just create a
new Directory in your vhost-path, thats it. It is not need to restart your Webserver</P
><P
>It is a good solution for Mass-Virtual-hosting for ISP's</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN539"
></A
>4.4.2. Download the source</H3
><P
>Origin-Site: <A
HREF="http://funkcity.com/0101/projects/dynvhost/mod_dynvhost.tar.gz"
TARGET="_top"
>http://funkcity.com/0101/projects/dynvhost/mod_dynvhost.tar.gz</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN543"
></A
>4.4.3. Building and installing</H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>cd /usr/local
tar -xvzf mod_dynvhost.tar.gz
cd dynvhost/
/usr/local/apache/bin/apxs -i -a -c mod_dynvhost.c</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Check <TT
CLASS="FILENAME"
>httpd.conf</TT
></B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Notice: Take a look at httpd.conf if mod_dynvhost.so is loaded at startup: </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LoadModule dynvhost_module libexec/mod_dynvhost.so</PRE
></FONT
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN551"
></A
>4.4.4. Sample configuration</H3
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN553"
></A
><P
><B
>Example 3. /usr/local/apache/conf/httpd.conf</B
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>&#60;DynamicVirtualHost /usr/local/apache/htdocs/vhosts/&#62;
HomeDir /
&#60;/DynamicVirtualHost&#62;</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><P
>Now create a Directory for each virtualhost in <TT
CLASS="FILENAME"
>/usr/local/apache/htdocs/vhosts/</TT
></P
><P
>i.e.</P
><P
><TT
CLASS="FILENAME"
>/usr/local/apache/htdocs/vhosts/foo.bar.org</TT
></P
><P
>You don't need to restart your Webserver</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN562"
></A
>4.5. mod_roaming</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN564"
></A
>4.5.1. What is mod_roaming</H3
><A
NAME="AEN566"
></A
><TABLE
BORDER="0"
WIDTH="100%"
CELLSPACING="0"
CELLPADDING="0"
CLASS="BLOCKQUOTE"
><TR
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
><TD
WIDTH="80%"
VALIGN="TOP"
><P
>With mod_roaming you can use your Apache webserver as a Netscape Roaming Access server. This allows
you to store your Netscape Communicator 4.5 preferences, bookmarks, address books, cookies etc. on the
server so that you can use (and update) the same settings from any Netscape Communicator 4.5 that can
access the server.</P
></TD
><TD
WIDTH="10%"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="RIGHT"
VALIGN="TOP"
>--<SPAN
CLASS="ATTRIBUTION"
>www.klomp.org/mod_roaming/</SPAN
></TD
><TD
WIDTH="10%"
>&nbsp;</TD
></TR
></TABLE
><P
>From the authors point of view: </P
><P
>Mod_roaming is indeed valuable. Unfortunately it does not work over proxy-connection.
You can keep your <SPAN
CLASS="APPLICATION"
>Netscape</SPAN
> 4.x bookmarks etc. synchronized on different machines. It is not supported
by any other browsers, including <SPAN
CLASS="APPLICATION"
>Mozilla</SPAN
> and <SPAN
CLASS="APPLICATION"
>Netscape</SPAN
> 6.x.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN574"
></A
>4.5.2. Download the source</H3
><P
>Origin-Site: <A
HREF="http://www.klomp.org/mod_roaming/"
TARGET="_top"
>http://www.klomp.org/mod_roaming/</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN578"
></A
>4.5.3. Building and installing</H3
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>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</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Check <TT
CLASS="FILENAME"
>httpd.conf</TT
></B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Check httpd.conf if mod_roaming is loaded at startup: </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LoadModule roaming_module libexec/mod_roaming.so</PRE
></FONT
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN586"
></A
>4.5.4. Sample configuration</H3
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN588"
></A
><P
><B
>Example 4. /usr/local/apache/conf/httpd.conf</B
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>RoamingAlias /roaming /usr/local/apache/roaming
&#60;Directory /usr/local/apache/roaming&#62;
AuthUserFile /usr/local/apache/conf/roaming-htpasswd
AuthType Basic
AuthName "Roaming Access"
&#60;Limit GET PUT MOVE DELETE&#62;
require valid-user
&#60;/Limit&#62;
&#60;/Directory&#62;</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="apache.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="compress.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Getting, build and install Apache with its basic modules</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Compressed delivery</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>