Forum

External FastCGI App in C++

Michael Simpson
30 August 2009, 23:31
Hiawatha version: 6.17
Operating System: Ubuntu

I have Hiawatha running on 192.168.88.128
I have an external FastCGI application (C++) running on 192.168.0.193:1962
I have an entry in my hosts 192.168.88.128 www.app.com

Hiawatha is running. I get the congrads page.

What I want however is to type on my web browser: http://www.app.com and have it call through to the External C++ application. There is no extension and there is no local application to start.

My config is:
Binding {
Port = 80
Interface = 192.168.88.128
MaxKeepAlive = 30
TimeForRequest = 3,20
}

...

FastCGIserver {
FastCGIid = QFastCGI
ConnectTo = 192.168.0.193:1962
Extension = *
SessionTimeout = 30
}

...

Hostname = 192.168.88.128
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

...

VirtualHost {
Hostname = www.app.com
WebsiteRoot = /var/www/app
AccessLogfile = /var/log/app/access.log
ErrorLogfile = /var/log/app/error.log
TimeForCGI = 5
UseFastCGI = QFastCGI
}


What do have to change to make this work?

Michael
Hugo Leisink
31 August 2009, 00:39
What you have to do is use the URL toolkit:
FastCGIserver {
FastCGIid = QFastCGI
ConnectTo = 192.168.0.193:1962
SessionTimeout = 30
}

UrlToolkit {
ToolkitID = app_toolkit
RequestURI exists Return
Match .* UseFastCGI QFastCGI
}

VirtualHost {
Hostname = www.app.com
WebsiteRoot = /var/www/app
AccessLogfile = /var/log/app/access.log
ErrorLogfile = /var/log/app/error.log
TimeForCGI = 5
UseToolkit = app_toolkit
}
This topic has been closed.