I have one machine with multiple domains and I'm trying to run multiple HTTPS web servers on it. All web servers have https support so I just need to redirect incoming packets to appropriate port (each domain has one port). I haven't found anything that wouldn't need relayd to have access to have access to the https certificates and keys. And man says that relayd doesn't support this (there is only client tls mode, server tls mode or both, there is no "redirect" or "pass"). Thanks for any suggestion, advice or just direction where to look for a solution.


You don't know the destination host when the connection is set up, unless you have the hosts on different IP addresses, and in that case you don't need to run them on different ports. Modern browsers will indicate the desired host name (Server Name Indication, SNI), but that will come too late and as part of the content for network based redirection.

The easiest solution is to use one Apache process (or whatever server you want to use), and have it host all your domains. If you really need different servers, you can have your web server act as a proxy that will forward to the desired destination. The man page of relayd doesn't mention anything about TLS support.

| improve this answer | |
  • TLS SNI support for relayd was added in OpenBSD 6.6 – Paul May 4 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.