R
R
recloudor2016-03-29 15:05:31
Apache HTTP Server
recloudor, 2016-03-29 15:05:31

(Error) How to set up webscoket on apache?

ProxyRequests Off
ProxyPass "/ws/" "ws://localhost:8080/"
I type this in the config, the request goes through, but an error, I can't upgrade.
WebSocket connection to 'ws://site.com/ws' failed: Error during WebSocket handshake: Unexpected response code: 400
Error in browser console

ProxyRequests off

    <Proxy *>
            order deny,allow
            allow from all
    </Proxy>


    ProxyPass /ws/  ws://localhost:8080/ws
    ProxyPassReverse /ws/  ws://localhost:8080/ws

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all

        RewriteEngine on
        RewriteRule ^(.*)$ http://localhost:8080/$1 [P,L]


    </Directory>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question