Failed loading terminal : WebSocket connection error (webmin behind proxy)

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Webmin version 2.105

Following configuration advice from the Webmin FAQ #can-i-run-webmin-or-usermin-behind-reverse-proxy, I managed to get webmin functional via https://webmin.mydomain.xx.
Terminal (in the Tools section) is not functioning however, although it was fine without proxy.
Behaviour is that the black terminal window shows briefly, but is replaced with the next:
image

Clicking the button in the right-hand top shows a black overlay window with “CONNECTING …”

This issue has been reported earlier, but I could not find any relevant solution. Most recognition was with this issue on Virtualmin. But that resolved itself automagically.

The complete relevant section in the Apache VirtualHost configuration is:

    # Enable the usage of the SSL/TLS protocol engines
    SSLEngine on
    SSLProxyEngine on
    #
    ProxyPass /.well-known !
    # Proxying both HTTP and websockets at the same time, where the websockets URL's are not websocket-only
    # or not known in advance
    ProxyPass        / https://localhost:10000/
    ProxyPassReverse / https://localhost:10000/
    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "wss://localhost:10000/$1" [P,L]

There is one file in /tmp/.webmin:

ws-555.out:

Running shell '/bin/bash -bash' with pid 403287
listening on port 555
timeout waiting for connection at /usr/share/webmin/xterm/shellserver.pl line 103.

Only two lines with the timestamp of the failing terminal in /var/webmin/miniserv.log:

<public domain ip> - <myusername> [23/Feb/2024:10:18:16 +0100] "GET /index.cgi/?xhr-info=1 HTTP/1.1" 200 13653
<public domain ip> - <myusername> [23/Feb/2024:10:24:44 +0100] "POST /xterm/ HTTP/1.1" 200 4119

No lines with the relevant timestamp in /var/webmin/webmin.log.

The browser console gives the next error:

Firefox can’t establish a connection to the server at wss://<mydomainname>/webmin/xterm/ws-555.

Hostname for WebSocket connections is set to Manual <mydomainname>/webmin.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.