liftoff / GateOne

Gate One is an HTML5-powered terminal emulator and SSH client
http://liftoffsoftware.com/Products/GateOne
Other
6.28k stars 925 forks source link

Using Gateone in docker and proxying with Apache #601

Open hanslammerts opened 8 years ago

hanslammerts commented 8 years ago

Hi,

I -think- I have Gateone docker setup correctly, at least I can see the container running and port 8000 is exposed to the outside. (I started Gateone like this: docker run -d --name=gateone -p 8000:8000 gateone Then I setup Apache to work as a proxy, proxying to localhost port 8000. But trying to go to Gateone in the browser ( http://myip/gw/ ) only returns a proxy error, 502, invalid response from upstream server.

If I do: openssl s_client -connect localhost:8000 , I can see the selfsigned certificate is sent back, but nothing else happens, until the request times out. Looking at the gateone.log within docker, doing a request from the browser, I see the following: [W 160421 20:07:03 iostream:1276] SSL Error on 11 ('172.17.0.1', 54232): [Errno 1] _ssl.c:510: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request

The relevant proxy section in Apache looks like this: ProxyPass /gw http://127.0.0.1:8000/ ProxyPassReverse /gw http://127.0.0.1:8000/

There is no error in my Apache log, other than a proxy error 502.

I can't get it to work at the moment. Does anyone else here have Gateone running in docker, and also has Apache (or nginx) as a proxy in front ?

If anyone can help me out, or point me in the right direction, I would be very grateful.

Thank you, Hans

mohnish82 commented 8 years ago

Because it uses web sockets, you need to setup web socket proxy in Apache. You'll also need to configure url_prefix in the configuration. Ref: ArchWiki

So, you'll have to create a custom docker image for this to work.