Jellyfin Forum
websocket requests return "404 Not Found" reply. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: websocket requests return "404 Not Found" reply. (/t-websocket-requests-return-404-not-found-reply)



websocket requests return "404 Not Found" reply. - pmc - 2025-08-25

My setup uses Apache to proxy requests to Jellyfin, with multiple clients connecting to it.
Clients: TVs with WebOS Jellyfin client, Android phones with Jellyfin client, and various web browser.

It generally works but I have an issue where websocket requests return a "404 Not Found" reply. HTTP/S requests work.

My apache configuration was taken from:
https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/apache/

Quote:<Location "/Jellyfin/socket">
       <RequireAll>
               Require ssl
               Require all granted
       </RequireAll>


       SSLRequireSSL

#       RequestHeader set X-Forwarded-Proto "https"
#       RequestHeader set X-Forwarded-Port "443"

       ProxyPreserveHost On
       ProxyPass "ws://127.0.0.1:8096/Jellyfin/socket"  
       ProxyPassReverse "ws://127.0.0.1:8096/Jellyfin/socket"

</Location>

<Location "/Jellyfin">
       <RequireAll>
               Require ssl
               Require all granted
       </RequireAll> 


       SSLRequireSSL

       ProxyPass "http://127.0.0.1:8096/Jellyfin"  
       ProxyPassReverse "http://127.0.0.1:8096/Jellyfin"
</Location>

This is an example request/reply:
Quote:GET /Jellyfin/socket?api_key=SNIP&deviceId=SNIP HTTP/1.1
Host: MYDOMAIN
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0
Accept: */*
Accept-Language: pt,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: https://MYDOMAIN
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: SNIP
DNT: 1
Sec-GPC: 1
Connection: keep-alive, Upgrade
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-origin
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket

Quote:HTTP/1.1 404 Not Found
Date: Mon, 25 Aug 2025 11:07:40 GMT
Server: Kestrel
Strict-Transport-Security: max-age=63072000
Content-Security-Policy: upgrade-insecure-requests
Content-Length: 0
Access-Control-Allow-Origin: *
X-Response-Time-ms: 0.1405
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

From the "Server: Kestrel" in the reply, the request is being forwarded by Apache to Jellyfin so it is Jellyfin that is replying with a "404 Not Found".

Any help or advice would be appreciated.

Thanks in advance.