Cannot override ErrorHandler

18 July 2009, 05:29
I just tried this in my config:

Directory {
Path = /home/www/
ExecuteCGI = yes
ErrorHandler = 404:/home/www/

Hiawatha refuses to start, accuses an error in the line of the ErrorHandler directive. I guess I can't define ErrorHandler in the Directory {} section of httpd.conf. But why not? I can override ExecuteCGI and other things...

Very well. The manpage says I can override the directory's ErrorHandler with a .hiawatha file. But that doesn't work either. Could it be wrong syntax? Unlikely. I can get it right for the "global" ErrorHandler page. So I can't have different 404 pages for different domains? The manual says I can. What am I doing wrong?


Hiawatha version: v6.15
Operating System: Linux
18 July 2009, 06:17
The error handler is a part of the VirtualHost settings. This works for me:
VirtualHost {
ErrorHandler = 404:/oops.html

Make sure the oops.html file is in the root of the respective virtual host directory. As you should have separate virtual host for each domain, you can use different 404 pages for each domain too.
18 July 2009, 09:21
Prit, your method works, but it still confuses me that the .hiawatha files do NOT override anything, contrary to what is stated in the manual. In fact, they seem to have no effect at all, even in the absence of other choices in the httpd.conf file. I may be doing something because I am very tired now, but I am at least 95% sure the .hiawatha files are not working. I will do some more testing over the weekend and keep you all posted.

Thank you for the help so far.
18 July 2009, 09:22
Correction: I may be doing something WRONG because...

Zzzzz now.
Hugo Leisink
18 July 2009, 13:24
Are you sure Hiawatha is able to read the .hiawatha file? Please check file permissions.
This topic has been closed.