Forum

Private files on SSL virtual host only

Marius Dinu
3 August 2014, 20:00
Hello.

I don't know if it has been already asked, but here's a quick question:
Can I have two virtual hosts, one simple http on port 80 and one SSL on port 443, with the same home page, but different subdirectories/aliases and with the same host name (my-account.no-ip.info)?
I want to host public files on port 80 without SSL and some private files only on port 443 with a self-signed certificate (or my own CA, not trusted by others).

Thank you!

Hiawatha version: upgraded today, v9.6 I think, but .exe file has no version information.
Operating System: WinXP SP3
Hugo Leisink
4 August 2014, 10:45
You could try using the RequiredBinding option.
Binding {
Port = 80
...
BindingID = normal_port
}

Binding {
Port = 443
...
BindingID = ssl_port
}

VirtualHost {
Hostname = www.site.net
WebsiteRoot = /var/ww/public
RequiredBinding = normal_port
...
}

VirtualHost {
Hostname = www.site.net
WebsiteRoot = /var/www/private
RequiredBinding = ssl_port
...
}
Marius Dinu
6 August 2014, 16:59
Works, but it seems that Opera and Iron redirect to https if it's available, even if I specify http://hostname:80. Is this happening only on my system?
Hugo Leisink
6 August 2014, 17:48
Clear browser cache and try again.
Marius Dinu
10 August 2014, 14:18
Works. Thank you!
This topic has been closed.