
mod_whois
=========

An Apache module for faking HTTP requests from whois queries. 
Apache2 required. 

Compile & Install
=================

apxs -i -a -c mod_whois.c

Configure
=========

Most simplest configuration:

Listen 43

<VirtualHost *:43>
WhoisProtocol On
</VirtualHost>

Inbound whois queries will be mapped to the URI /cgi-bin/whois?query=<query>,
with <query> properly quoted.

To change the mapping destination, add to your httpd.conf:

WhoisPrefix "GET /whois.php?searchstring="

(WhoisPrefix will have the whois query appended). You can not only map
queries to scripts, but also to static content:

WhoisPrefix "GET /whoisinfo/" 

will make apache trying to retrieve /whoisinfo/bla if asked for "bla" 
Attention: Be aware that if an 404 occurs, the client is presented with an
ugly HTML error message (which, BTW will contain the mapped URI). 
So, if you map to static content, you may want to add e.g.

ErrorDocument 404 /whoisinfo/404hider.txt

(and an appropriate text error message) to your installation. You may always
want to add an 

ErrorDocument 500 /whoisinfo/kaputt.txt

In case your CGI fails (e.g. to connect to your backend database).

existing bugs
=============

Not that i'm aware of (yet) ;) I haven't tried yet to run the module 
under a different MPM than prefork. YMMV.

licensing
=========

please see seperate file LICENSE

---

Have fun

Alexander Mayrhofer
axelm@nic.at



