Marjolein Katsma (email@example.com)
Mon, 22 Feb 1999 13:48:05 +0100
I ran into the same problem when first installing ht://Dig. The root of the
problem is that when you log in with Telnet, you see a different "root"
than your webserver does. th eht://Dig programs will need to know this.
Here is how I explained it to someone else who emailed me with the same
I'll try to explain a few things.
First you have to understand a few basics about how your virtual server works.
- when you telnet in, you arrive at your home directory:
/usr/home/<username> (type pwd to find out the exact path; I suspect your
"usr/local/compute5" is not correct)
- you have "root access" which means you can move up the tree and actually
do cd /
- the root access also enables you to use programs and facilities on the
Unix system which are not in your personal space but somewhere "above" that
(usually they are in the path so you don't need a location)
- any process you run from the telnet prompt (like make) will be able to
"see" the whole space, up to the real root.
- the webserver is *not* run from the telnet prompt and does *not* have
root access; the "root" it sees is your home directory. / for the webserver
corresponds to /usr/home/<username> in telnet. In other words: the
webserver sees a virtula root, not the "real" one
- your webserver (and FTP) has a ServerRoot, which is normally set to
/usr/local.etc/httpd (set in httpd.conf); seen from telnet, this
corresponds to /usr/home/<username>/usr/local/etc/httpd
- a CGI program runs in your server space and thus also sees only the
virtual root, not the real one.
- the web server also has a DocumentRoot, normally
/usr/local/etc/httpd/htdocs (note this uses the virtual root as a
reference!); this is teh root that a webclient will see as /
To prepare htdig, you have to realize what function is going to be used
where. htdig, htmerge, htnotify and htfuzzy are run from telnet, and will
"see" the real root; any pathing they need will have to take this into
account; htsearch, however, will run as a CGI program and will see only the
==> this means that htsearch will need a different configuration both for
compiling and linking and for running !!
Some steps I took after running config:
1) source installed in a tree /usr/home/<username>/usr/local/htdig-3.1.0b4
2) I got around the 'make' problem simply by going through all the
Makefiles and changing the include statements, i.e,
(note the dot and the quotes); possibly you can use gnu make, but I didn't
want to go hunting for that
3) Further adaptations to Makefile.config:
- CXX= /usr/bin/g++
- CC = /usr/bin/gcc
4) Changes to CONFIG:
prefix= /usr/home/<username>/usr/local/htdig #this is
where the executables will end up
5) Since htsearch needs a different environment, the Makefile in
/usr/home/<username>/usr/local/htdig-3.1.0b4/htsearch will need further
adaptation. It *cannot* simply use include of Makefile.config and
(indirectly) CONFIG: those paths that will end up in the executable will
have to refer to the virtual root instead of the real root.
==> I got around this by copying Makefile.config into this Makefile, and
then CONFIG, editing out all unneeded comments, and then editing the paths
where necessary. Notably:
This will compile htsearch so it will run from cgi-bin; maybe some other
changes are necessary as well
==> Run Make in the /usr/home/<username>/usr/local/htdig-3.1.0b4/htsearch
so it is compiled and linked with the different prefix path.
Then follow the rest of the instructions and make and make install.
Executables for htdig, htmerge, htnotify and htfuzzy should end up in what
you've set for prefix (you may want to create the directory firts, just in
Executables for htsearch *should* end up in your cgi-bin - it didn't in my
case, so I moved it there manually. (I probably missed a path somewhere but
didn't want to go digging; just moving the executable was faster...)
Now, the example htdig.conf (in usr/local/htdig/conf) will need to be split
up in two versions: one for running htdig, htmerge, htnotify and htfuzzy
(real root) and one for htsearch (virtual root); Go through the
documentation for Configuration file to decide which paremeter needs to go
where. I suggest you keep the original and create two new files with
It's possible to run htsearch from the telnet command line; in that case
you need yet another configuration file, with the same parameters you're
using for htsearch normally, but with paths referring to the real root again.
Finally, there's a sample rundig script (in usr/local/htdig/bin); adapt so
it uses full paths (real root) for the configuration file).
==> important: comment out the line that starts with TMPDIR= . (if not,
you'll end up with an endless loop when htmerge tries to call sort...)
Now, do final configuration of your configuration file (start_url and
whatever else you want to configure), and you're ready to run rundig for
the first time.
When that's done, you can run search fom the sample search form to test;
but first, change the configuration parameter of the form so it mentions
your htsearch-only configuration file!
It is quite possible some shortcuts are possible (I am no expert in Make) -
but this has worked for me.
Hope this helps,
At 11:51 1999-02-22 +0000, COUSINS_M wrote:
>I am a new user to htdig. I have set the software up and ran the rundig
>program to create the index (am currently using the test one that
>searches the Htdig documentation), however whenever i run the html page I
>get the following error:
>htsearch detected an error. Please report this to the webmaster of this
>site. The error message is:
>Unable to read configuration file
>However I have checked this directory and the file is there, I have the
>following HTML line in my search page to specify the config file name:
>input type=hidden name=config value=htdig
>Also, if I telnet in to my account and switch to the CGI-bin for my
>webserver I can run the htsearch directly from there, it asks for
>keywords if I enter them then it outputs the contents of a HTML file into
>Any ideas, help would be appreciated.
>To unsubscribe from the htdig mailing list, send a message to
>firstname.lastname@example.org containing the single word "unsubscribe" in
>the SUBJECT of the message.
Marjolein Katsma email@example.com
Java Woman - http://javawoman.com/
To unsubscribe from the htdig mailing list, send a message to
firstname.lastname@example.org containing the single word "unsubscribe" in
the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Mon Feb 22 1999 - 07:08:23 PST