HOWTO Use Catacomb with Apache

GRASE Lab at UCSC grase (at)

0.01, 2002-8-30

This is a brief explanation about Catacomb. This explains what is Catacomb, howto install it and how to use it. The enables the SEARCH method which is specified in the DASL protocol. The Catacomb is a module for Apache and repository interface of mod_dav.

1. Introduction

There are many web servers. Suppose you have one web server which has millions of documents. How would you find find particular documents whose author is Jim and which contain a key word such as java. A Catacomb is a perfect solution for that.

The Web-DAV protocol is an extension of HTTP and it enables the user to write to the HTTP server, give properties for resources and other functions. DASL is extension of Web-DAV and it enables the user to search resources in the Web server. Catacomb is a DASL implementation for Apache and mod_dav.

This document explains how to install the Catacomb module and use it.

1.1 Copyright

Copyright (c) 2002, The Regents of the University of California.

The Regents of the University of California MAKE NO REPRESENTATIONS OR
NON-INFRINGEMENT. The Regents of the University of California SHALL

2. What is Catacomb?

Briefly, it is :

DASL specifies the SEARCH method for searching and locating resources. In other words, it enables the user to search resources in the web server using the DASL protocol. Catacomb is the implementation of DASL which allows web server to support a search function.

To implement the search function, Catacomb uses MySQL. That means if you are saving some resources using PUT or MKCOL which are Web-DAV methods, all of the resources and their information are saved in not a file system, but in DBMS.

3. Installation

3.1 What do I need?

You need :

3.2 Quick Tour

We assume that your MySQL is installed in the /usr/local directory.

<shell> tar xvfz  httpd-2.0.36.tar.gz
<shell> cd http-2.0.36
<shell> ./configure --enable-dav --enable-so
<shell> make; make install
<shell> cd ..
<shell> tar xvfz catacomb-x.x.x.tar.gz 
<shell> cd catacomb-x.x.x
<shell> ./configure --with-apache=/usr/local/apache2 --with-mysql=/usr/local
<shell> make; make install
<shell> add this in /usr/local/apache2/conf/httpd.conf
|# This is server configure now                           |
|DavDBMSHost localhost                                    |
|DavDBMSDbName repos                                      |
|DavDBMSId   root                                         |
|DavDBMSPass root                                         |
|DavDBMSTmpDir /tmp/                                      |
|                                                         |
|<Location /repos>                                        |
|DAV repos                                                |
|<//Location>                                             |

<shell> mysqladmin create repos
<shell> mysql repos < table.sql
<shell> mysql repos < data.sql
<shell> /usr/local/apache2/bin/apachectl start
Enjoy DASLed Apache server!

3.3 Installation

You need MySQL, and you can download it from the MySQL Web Site. I assume that MySQL is already installed on your machine. There is no special MySQL option for mod_dav_dasl, so you don't need to reinstall MySQL for Catacomb, if MySQL is already installed. If you have some difficulties to install MySQL, please visit the MySQL homepage. The default MySQL installation directory is /usr/local.

You need Apache 2.0.36 or later version for Catacomb. You can download the latest Apache server from the Apache Web Site. When you install Apache, we need two options, --enable-dav and --enable-so. Catacomb is a mod_dav interface, so we need to enable mod_dav. The Catacomb object is a shared style object, so your Apache must support shared objects. The default Apache installation directory is /usr/local/apache2. You can enable two option by configuring with this command:

<shell> ./configure --enable-dav --enable-so

Now, it is time to install Catacomb. You can download the latest version from the Catacomb project Web Site. Untar the source. When you configure the Catacomb, you need to select two options, --with-apache and --with-mysql. Using --with-mysql option, you need to specify the mysql C client library directory, and using --with-apache, you will specify the apache directory. The default directory is the /usr/local directory for MySQL and the /usr/local/apach2 directory for Apache.

After finishing the configuration, you can do make and make install.

3.4 Configuration

We need two configurations such as:

You want to add these lines into the /usr/local/apache2/conf/httpd.conf file.

|# This is server configure now                           |
|DavDBMSHost localhost                                    |
|DavDBMSDbName repos                                      |
|DavDBMSId   root                                         |
|DavDBMSPass root                                         |
|DavDBMSTmpDir /tmp/                                      |
|                                                         |
|<Location /repos>                                        |
|DAV repos                                                |
|<//Location>                                             |
Here are the directive explanations:

Second configuration job is creating DB and tables for mod_dav_dasl. DB which is already exist for other usage is reusable for Catacomb, but creating a new DB for Catacomb is strongly recommend. You can create new DB using the mysqladmin command:

<shell>mysqladmin create repos
This command will create DB named repos. There are several tables used by Catacomb. You can create tables by importing table.sql in the Catacomb source directory using this command:
<shell>mysql repos < table.sql
You might need -u and -p options for MySQL, if you specified a database user for the DB. Finally, you need to import data for your root information of the Catacomb enabled directory. In our example, the directory name is /repos. If you specified different directory name, you need to edit data.sql in the Catacomb source directory. Also, if you have more than two directory directives for Catacomb, you need to import data.sql several times with different directory data. This is the example of data.sql.
INSERT INTO dasl_resource VALUES 
Make sure the third arguments in the example (/repos) is same as your Location in httpd.conf. You want to import the data.sql using this command:
<shell>mysql repos < data.sql

3.5 Fire your Apache.

<shell>/usr/local/apache2/bin/apachectl start

4. DASL Clients

If you want to test your DASLed server very quickly, the simplest and best way is using telnet. Do telnet to your server and the port. Let's suppose our DASLed server is and port is 7777. We can test by typing the OPTION method:

ocean 10> telnet 7777
Connected to
Escape character is '^]'.
OPTIONS /dasl/ HTTP/1.1

HTTP/1.1 200 OK
Date: Wed, 08 May 2002 09:16:13 GMT
Server: Apache/2.0.36-dev (Unix) DAV/2 DASL/0.1
DAV: 1
DAV: <>
MS-Author-Via: DAV
DASL: <DAV:basicsearch>
Content-Length: 0
Content-Type: text/plain; charset=ISO-8859-1
If you can see SEARCH method in Allow field in the response, your DASLed server is working properly.

4.1 Read/Write resources

Unfortunately, you can not copy resources or make directory directly like usual Apache file system directories, since Catacomb use MySQL to save all resources and their data. So you need to use Web-DAV client to read/write your resources in the DASLed server. There are many WebDAV client programs. You can use one of these client and read/write your resources. If you want to only read your resources, a web browser are a good tool. For more information about WebDAV software, visit the WebDAV resource site.

4.2 Search

So far, there is not many DASL clients. When we write this HOWTO, cadaver DASL patch is on developing. The cadaver client will support DASL, when you read this HOWTO. Hopefully there will be lots of DASL clients very soon.

5. Trouble shooting.

If your DASLed server doesn't work properly, reading error_log in the Apache's log directory is good idea. Here are simple check lists:

6. Conclusion

Catacomb project is just started, so we have lots of thing to do and to improve though. I hope Catacomb and this HOWTO could help your Internet environment.

6.1 Call for participation

Catacomb is open source project under Apache License. So anybody is welcome to the project. Please content to catacomb(at), if you have interest.