# Using Apache 2.4 in front of awx\_web container for https causes issues with websockets

**URL:** <https://forum.ansible.com/t/using-apache-2-4-in-front-of-awx-web-container-for-https-causes-issues-with-websockets/27460>\
**Category:** AWX Project\
**Created:** [May 4, 2018, 8:49pm UTC](https://forum.ansible.com/t/using-apache-2-4-in-front-of-awx-web-container-for-https-causes-issues-with-websockets/27460 "2018-05-04T20:49:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Reagan](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Post date:** [May 4, 2018, 8:49pm UTC](https://forum.ansible.com/t/using-apache-2-4-in-front-of-awx-web-container-for-https-causes-issues-with-websockets/27460/1 "2018-05-04T20:49:12Z")

</div>

I have Apache set up as a reverse proxy so that I can use https. Everything but websockets, and anything relying on them, seems to load when I visit the site. Unfortunately, I have had very little luck getting mod\_proxy\_wstunnel to work.

Firefox outputs these errors when I visit the homepage:

> Network UI loaded  
> app.6489c481c2a5ca9d0668.js:42:2436494  
> Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help [http://xhr.spec.whatwg.org/](http://xhr.spec.whatwg.org/)  
> vendor.4f5ff2b0e1c182be9654.js:29:94434  
> Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> Firefox can’t establish a connection to the server at wss://autoansible.lanecc.edu/websocket/.  
> app.6489c481c2a5ca9d0668.js:24:987679  
> The connection to wss://autoansible.lanecc.edu/websocket/ was interrupted while the page was loading.  
> …

Here is where I am right now:

`RewriteEngine On #RewriteCond %{REQUEST_SCHEME} "wss" [NC] #RewriteCond %{REQUEST_SCHEME} "ws" [NC] #RewriteCond %{REQUEST_URI} ^/websocket/ [NC] #RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteRule /(.*) wss://localhost:8080/$1 [P,L] RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.*) http://localhost:8080/$1 [P,L] #ProxyPreserveHost On #ProxyPass "/websocket/" "wss://127.0.0.1:8080/websocket/" #ProxyPass "/" "http://127.0.0.1:8080/" ProxyPassReverse "/" "http://localhost:8080/"`

As you can see from the commented out lines, I’ve tried many things.

Much of what I have tried has come from [https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel?utm\_medium=organic&utm\_source=google\_rich\_qa&utm\_campaign=google\_rich\_qa](https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa)

Of course the accepted answer is [socket.io](http://socket.io) specific. So, yeah…

Any help would be appreciated.

I’m running the 1.0.6 branch and I set the `dockerhub_version` to `1.0.6` as well. So I’m not building my own images.

`host_port=8080` is set.
