Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

BitNami WAMP Stack

Contains ApacheLounge build

Apache Reverse http:// proxy being hijacked by ws://

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 03 Aug 2017
Posts: 1

PostPosted: Thu 03 Aug '17 16:51    Post subject: Apache Reverse http:// proxy being hijacked by ws:// Reply with quote

I have had apache reverse proxy working fine for a while, however one of the items I proxy too now requires ws:// rtaher than http://

I have added in the config for this and it works, however it then hijacks all other redirects.

For example:

If I access a standard http:// -> http:// proxy (e.g target2 below) - this works.

If I access a standard http:// -> ws:// proxy (e.g target1 below) - this works.


After accessing the ws:// (e.g target1 below) proxy redirect - all subsequent redirects (e.g target2,target3 below)then end up at the ws:// target1 instead for the remainder of the browser session.

I'm sure this is probably something to do with the socket remaining open or something along those lines, however I really do not know enough about it to begin guessing.

conf example below:

<IfModule mod_ssl.c>

        <VirtualHost _default_:333>

                ServerAdmin webmaster@localhost
                DocumentRoot /var/www/html/
                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                SSLEngine on
                SSLCertificateFile /etc/apache2/keys/fullchain.pem
                SSLCertificateKeyFile /etc/apache2/keys/privkey.pem

        ProxyPass /target1 ws://
        ProxyPassReverse /target1 ws://

        ProxyPass /target2 retry=0
        ProxyPassReverse /target2

        ProxyPass /target3 retry=0
        ProxyPassReverse /target3



Any pointers would go a long way.
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6317
Location: Germany, Next to Hamburg

PostPosted: Mon 28 Aug '17 23:21    Post subject: Reply with quote

Yepp it is because of the headers

HTTP Response

Upgrade: WebSocket
Connection: Upgrade

The browser keeps that.

So you may use location(s) instead of the vhost only and use unset header or set a different header. I'm not sure. I can't use sockets on windows with apache.
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1