Hi Hugo,
Using "RequiredBinding" , I am able to partially achieve my goal.
Now all POSTs to extension "special_ssl" get redirected to "special.fcgi" using SSL.
&
any connections to "special" get directed to same "special.fcgi", NOT using SSL(normal http).
Attached is my new conf file,
However there is no fixed IP address ( domain nametoo). In my setup the IP is dynamic.
So I cannot use VirtualHost, right?
Whenever the IP address changes, restarting Hiawatha each time is kind of nasty.
Is there any way I can get this done with localhost IP address 127.0.0.1 or localhost?
or use directory, instead of virtualHost?
Thanks
Praseed
# Hiawatha main configuration file
# GENERAL SETTINGS
#
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /dev/null
GarbageLogfile = /dev/null
# BINDING SETTINGS
# A binding is where a client can connect to
#
Binding {
Port = 81
MaxKeepAlive = 30
TimeForRequest = 3,20
BindingID = port81
}
Binding {
Port = 443
SSLcertFile = /var/webdmn/ssl_cert/ssl_pub_cert_complete.pem
MaxKeepAlive = 30
TimeForRequest = 3,20
BindingID = port443
}
# CGI server on local machine only
#FCGI1 connects to port 2005
FastCGIserver {
FastCGIid = FCGI1
ConnectTo = 127.0.0.1:2005
Extension = fcgi
SessionTimeout = 30
}
UrlToolkit {
ToolkitID = to_fcgi
RequestURI isfile Return
Match ^/www/special_ssl Rewrite /special.fcgi
Match ^/www/special Rewrite /special.fcgi
}
#Hostname = 127.0.0.1
#WebsiteRoot = /mnt/drivers/webdmn/www/hiawatha
#AccessLogfile = /mnt/drivers/webdmn/log/hiawatha/access.log
#ErrorLogfile = /mnt/drivers/webdmn/log/hiawatha/error.log
#UseFastCGI = FCGI1
#TimeForCGI = 20
#UseToolkit = to_fcgi
# VIRTUAL HOSTS
### For SSL Connections
virtualHost {
# Arrrg, must have IP addr(or a host name) if Virtual!!!
Hostname = 192.168.1.101
WebsiteRoot = /mnt/drivers/webdmn/www/hiawatha
AccessLogfile = /mnt/drivers/webdmn/log/hiawatha/access.log
ErrorLogfile = /mnt/drivers/webdmn/log/hiawatha/error.log
TimeForCGI = 5
UseFastCGI = FCGI1
UseToolkit = to_fcgi
RequiredBinding = port443 #This line differentiates the connection type
}
# Non-SSL at port81 binding
virtualHost {
Hostname = 192.168.1.101
WebsiteRoot = /mnt/drivers/webdmn/www/hiawatha
AccessLogfile = /mnt/drivers/webdmn/log/hiawatha/access2.log
ErrorLogfile = /mnt/drivers/webdmn/log/hiawatha/error2.log
TimeForCGI = 5
UseFastCGI = FCGI1
UseToolkit = to_fcgi
RequiredBinding = port81 #This line differentiates the connection type
}