0

I have a websocket service running on an Apache server.

I read that you need to active two modules proxy_fcgi and proxy_wstunnel and reload Apache. (Done)

This is my virtualhost file

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName chat.xxx.com
        DocumentRoot /var/www/chat.xxx.com/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # Proxy Node.js
        ProxyPass / http://localhost:8000/ connectiontimeout=5 timeout=30

        ProxyPass        /socket.io  ws://localhost:8000/socket.io
        ProxyPassReverse /socket.io  ws://localhost:8000/socket.io
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

My Node.js app is running on port 8000 but I can't get any client to connect to the websocket.

What am I missing?

1
  • Shot in the dark, but perhaps try wss://localhost:8000/socket.io. Nov 18 '19 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.