Hostname for WebSocket

Jim Sung
9 February 2019, 09:36
Dear Sir:

I'm trying to get WebSocket to work with the following VirtualHost:
VirtualHost {
HostName = *
WebsiteRoot = /var/www/hiawatha
WebSocket = ws:// /websocket
# WebSocket = wss:// /websocket

but I'm getting a 404.

After instrumenting the code and looking at hostname_match() in libstr.c, I don't think "*" will "match anything", which is what I thought it will do initially, so what should I set "Hostname" to?

I've read and


Jim Sung
11 February 2019, 03:00
Hi Hugo:

In, you wrote
Hiawatha only provides the protocol switch and the connectivity.
so if I understood you correctly, if HTTP/HTTPS host is X, then WS/WSS host needs to be Y (X and Y can have the same IP address), is that correct?

In the back-end, I have "libwebsockets", so it will handle the protocol.

Thanks in advance for any clarification.

This topic has been closed.