Skip to content

Getting Not Found (auth=none) or Unauthenticated (auth=password) #5304

Answered by mafut
mafut asked this question in Q&A
Discussion options

You must be logged in to vote

Found the reason why my configuration didn't work.

Didn't work:

RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:8888/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://127.0.0.1:8888/$1 [P,L]

Worked:

RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteCond ${HTTP:Connection} upgrade [NC]
RewriteRule .* "ws:/localhost:3000/$1" [P,L]

But even though "Not found" or "Unauthenticated" were fixed, there was another issue after. It was no response of websocket request. In browser developer tool, webscoket request kept Pending.

I gave up to use apache and moved to nginx. Nginx is working perfectly.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mafut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants