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

305
Vistas
Apache does not send the body of the web socket

I want to use Apache to reverse proxy my websocket server.

The socket web server works properly without Apache and has no problems. But when using Apache as websocket reverse proxy , no message delivers to user even tough the Web socket handshake is done properly.

When the connection is closed, all messages are suddenly transmitted to the user.

as you can see handshake with socket server is done properly but no welcome message is send to the client(when using apache reverse proxy)

enter image description here

closing socket server (like ctrl+c) will cause all the stuck data arrive at once

enter image description here

In my experiment, if a large amount of text is echoed at the beginning of the connection(in socket server as welcome message), after passing a certain volume (maybe for($i<200) times echoing welcome message instead of one time), all the text is transferred to the user. Apache seems to be buffering the body of the web socket and flashing it after the buffer is full

enter image description here

my apache directive for reverse proxy :

RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) ws://127.0.0.1:6001/$1 [P,L]

Web socket server : laravel websocket
Php version : 8
Os : centos 7 - managed by whm

update : installed nginx and tried the same everything and it works. I think there is a very high probability that this problem is from Apache or its modules.

any idea of what is going on ?

over 4 years ago · Santiago Trujillo
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