Other alternatives? Other components, perhaps from third parties, who have examples to do what I want? We accept advice.
Indy (which is available in Lazarus' OPM) is cross-platform and works on Linux. Among many components, it has a TIdHTTPServer component which supports SSL/TLS connections for handling HTTPS.
- Assign a TIdServerIOHandlerSSLBase-derived component (such as TIdServerIOHandlerSSLOpenSSL) to the TIdHTTPServer.IOHandler property, and configure it as desired (enabled SSL/TLS versions, certificates, etc).
- Configure the TIdHTTPServer.Bindings property with the desired local IP:Port pair(s) that you want to accept connections on. For HTTP, you should have a Binding on port 80, and for HTTPS, you should have a Binding on port 443. Though you can use any port(s) you want (in which case URLs to your server will have to specify those ports explicitly).
- If you use an SSL port other than 443, assign a handler to the TIdHTTPServer.OnQuerySSLPort event, and have it return True or False based on whether the provided APort parameter is a desired HTTPS port.
- Assign handlers to the TIdHTTPServer.OnCommand... events as needed, such as OnCommandGet.