On Wed, 27 Jul 2005 01:50:37 -0400 Richard Peskin <[EMAIL PROTECTED]> wrote:
> I needed to relocate my "conf" directory. Unfortunately, it appears
> that the default (CONF_DIR) is "hard wired" into the compilation for
> htsearch.
Because of restrictions imposed by my space provider almost every file
for htdig is in the "wrong" place. Here's what I did to fix it, which
definitely works for 3.1.6 and I'm fairly sure it's OK for 3.2 as well.
The OS is Red Hat Enterprise v3, and the httpd is Apache 2.0.46
Here is the form section from the search page:
<form class="middle" method="get" action="/cgi-bin/htsearch.sh"
style="text-align:center;bottom-margin:0">
<input type="hidden" name="format" value="short">
<input type="hidden" name="config" value="htdig">
Search for: <input type="text" size="40" name="words">
<input type="submit" value="GO"
style="background-color:#ffba08;text-color:darkgreen;text-size:+1">
</form>
Note: is is *essential* to have the name of the config file in here,
even though it is the compiled-in default!
Here is the shell-script called from the form
#!/bin/sh
# htsearch.sh /var/www/cgi-bin
# wrapper script needed because the libs, config etc are not in the
# directories that htdig was compiled for. MikeC 2004 Oct 13
# Note that htsearch -c "configfile" doesn't work from Apache, see FAQ 5.30
# and that the name of the config file *must* be in the form data!
# 3.1.6 doesn't need ld_library_path, but 3.2.0 does.
# LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib/htdig
export HTBINDIR=/usr/local/bin
export CONFIG_DIR=/usr/local/lib/conf
export REQUEST_METHOD=GET
$HTBINDIR/htsearch
# test script, handy for checking variables being passed
# /var/www/cgi-bin/envprint.pl
The relevant part of the config file looks like this:
# htdig.conf /usr/local/lib/conf
# Last Modified 2004 Nov 25 MikeC
database_dir: /usr/local/lib/htdig_db
common_dir: /var/www/html/htdig
[....]
And that's it, easy really, although it took several days to discover the need
for the name of the config file in the form :-/
HTH,
Mike
--
Mike Causer Email - mailto:[EMAIL PROTECTED]
GPG KeyID 1C2DDA07 WWW - http://www.mikecauser.com
Flood the fen again! - Wicken Fen enlargement - http://www.wicken.org.uk
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ht://Dig general mailing list: <[email protected]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general