Forum

Hiawatha WebServer using SSL (https) on Windows

Pedja
4 November 2010, 07:10
Official tutorial about installing SSL on Hiawatha is at http://www.hiawatha-webserver.org/howto/bindings. Read it before proceeding further.

If you want to use SSL on windows there is slight difference. Here are the complete instructions

Download Win32OpenSSL_Light-0_9_8j.exe (you will easily find it) and install into c:\OpenSSL.

Go to c:\OpenSSL\bin

Create bat file containing these commands:
openssl genrsa -out serverkey.pem 2048
openssl req -new -x509 -days 3650 -key serverkey.pem -out server.crt -config C:\OpenSSL\bin\openssl.cfg
echo "" >> serverkey.pem
type server.crt >> serverkey.pem
echo "" >> serverkey.pem
del server.crt

Run batch file. Answer to asked prompts *most of them may be skipped by pressing <Enter>

Copy serverkey.pem to Hiawatha directory.

Stop server service if it is running.

Edit hiawatha.conf and add new Binding like
Binding {
BindingID = SSL
Port = 443
SSLcertFile = C:\Program Files\Hiawatha\serverkey.pem
MaxKeepAlive = 30
TimeForRequest = 3,20
}

If you want to force any VirtualHost to use SSL then set
VirtualHost {
...
RequireSSL = yes
}

Start Hiawatha service.

Now you may access al hosts using https. For one that you have set SSL as required, if you try to access them using http, you will be automatically redirected to https.
This topic has been closed.