Hi,
I've a Hiawatha setup up & running with FCGI application in the back end.
It is working fine & now I'm trying to configure the Hiawatha to match on URI or directory.
I went through the manual pages, howto & posts on the forum.
I changed my config file according to what I found, still I'm not able to what I want.
My requirement is
1) If the file exists, return that file.
2) If the request URI is http://192.168.1.2/special
redirect/rewrite to test,fcgi
3) If the equest URI is http://192.168.1.2/admin
redirect/rewrite to config.fcgi2
Whenever I try to run http://192.168.1.2/special, its returning 404-Not found
The earlier configuration based only on extension was working for me with no issues.
I'm able to configure & get things done with lighttpd, but I prefer Hiawatha server.
Please help me fix this.
My main stuff in my httpd.conf is as given below.
#BINDING SETTINGS
Binding {
Port = 80
MaxKeepAlive = 30
TimeForRequest = 3,20
}
#FCGI1 connects to port 2005
FastCGIserver {
FastCGIid = FCGI1
ConnectTo = 127.0.0.1:2005
Extension = fcgi
SessionTimeout = 30
}
#FCGI2 connects to port 2006
FastCGIserver {
FastCGIid = FCGI2
ConnectTo = 127.0.0.1:2006
Extension = fcgi2
SessionTimeout = 30
}
# DEFAULT WEBSITE
Hostname = 127.0.0.1
WebsiteRoot = /usr/localvar/www/hiawatha
StartFile = index.html
ShowIndex = yes
AccessLogfile = /usr/local/log/hiawatha/access.log
ErrorLogfile = /usr/local//hiawatha/error.log
#ErrorHandler = 404:/error.cgi
UrlToolkit {
ToolkitID = to_fcgi
RequestURI isfile Return
Match ^/special Rewrite /test.fcgi
Match ^/admin Rewrite /config.fcgi2
}
VirtualHost {
Hostname = 127.0.0.1
WebsiteRoot = /usr/localvar/www/hiawatha
ShowIndex = yes
AccessLogfile = /usr/local/log/hiawatha/access.log
ErrorLogfile = /usr/local/log/hiawatha/error.log
TimeForCGI = 20
UseFastCGI = FCGI1,FCGI2
UseToolkit = to_fcgi
}
Hiawatha version: 6.14
Operating System: RHEL 5