Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Apache2 reverse proxy and websocks

I'm trying to allow the websocks in my reverse proxy with this:

<Location "/monitor">
        ProxyPreserveHost On
        RequestHeader set X-Forwarded-Proto https
        RequestHeader set X-Forwarded-Port 443

        RewriteEngine On
        RewriteCond %{REQUEST_URI}  ^/monitor/notify       [NC]
        RewriteCond %{QUERY_STRING} transport=websocket    [NC]
        RewriteRule ^/monitor/notify/(.*) wss://localhost:8001/monitor/notify/$1         [P,L]

        ProxyPass http://localhost:8001/monitor
        ProxyPassReverse http://localhost:8001/monitor
</Location>

But I'm getting this error:

VM690:149 WebSocket connection to 'wss://MY.HOST/monitor/notify/516/q7pqnqdz/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

What I'm doing wrong?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solved with this:

RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /monitor/(.*) ws://127.0.0.1:8001/monitor/$1  [P,L]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!