Hiawatha
A secure and advanced webserver

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
I have an external FastCGI application (C++) running on :1962
I have an entry in my hosts 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 =
MaxKeepAlive = 30
TimeForRequest = 3,20
}

...

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

...

Hostname =
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 = :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.