On 11/5/07, Clint Davis <email@example.com> wrote:
On 11/5/07 12:38 PM, "David T. Ashley" <
On 11/5/07, Clint Davis <
I'm running htdig 3.2.0b5 under RHEL 4. I have numerous virtual hosts using
htdig. I tried organizing all my htdig files into the following directory
structure, but I'm getting "Unable to read conf file" errors.
What is the best method for organizing my binaries (htsearch, htmerge,
etc.), conf files, and rundig files?
Please be more specific about the virtual hosts. Do the search queries all search the same database, or is there one database per virtual host? What is your intent with the virtual hosts? Are you supporting multiple users/clients? Or do you have a bunch of web content under different domain names that you want wrapped into the same search database?
One database per virtual host. I am supporting multiple users/clients. Each virtual host may have multiple domain names, but each searches the same database. I have Apache configured to redirect people hitting
domain2.com (an extra domain for vhost1) to
domain1.com (the primary domain for vhost1).
OK, it has been years since I used htDig, but let me spew suggestions, anyway.
I do remember that htDig was unusual in that there were overlapping compile-time options and configuration file options. So, in general it would be logical to do the following:
a)Write down where the configuration file is.
b)Be sure that the path is reflected properly in the compile-time configuration (I seem to remember that there is a file you must edit).
c)Be sure you did the compile AFTER modifying the file that affects compilation.
Once that is done:
a)*nix in general has permissions that have to be permissive all the way down the tree to the file that the compiled program wants to read. I don't want to get into a long discussion about this, but let me point out that a sure way to debug this is:
a1)"su" to be the same UID/GID that the web server is, i.e. "su apache". Double check with "whoami".
a2)Type "cat configuration_file_name" to be sure you can read it.
b)Don't forget that both the cron process that rebuilds the htdig databases and the cgi-bin that runs from the web server have to have the right permissions to read the config file. Depending on how you set things up, this may be two different UIDs.
If anything above is mysterious, just reply and let's iterate on the confusing things.