vhost: fix rewrite to HTTPS for custom SSL ports

Fixes #477