Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda