Ask Your Question
0

connecting VNC from WAN behind a Apache 2.4.6 proxy

asked 2013-11-14 11:25:22 -0500

hofi gravatar image

updated 2013-11-15 02:52:27 -0500

I've installed OpenStack Havana and it runs quiet well. The trouble is i can't connect the console of the VMs from WAN. If i open a browser, connect form WAN to the Controller node, log in and try to open a console of one of the VMs in an new window i get the correct link (with the specified public Domain Name) and the token... but the screen stays grey/black and on top in the red bar i get the message "Server disconnected (code: 1006)" if i paste this link to a new browser window on a system connected to my LAN and replace the the public Domain Name by the hostname of the Controller node on which also the nonvncproxy is running i get the console and it's possible to login. I know the Problem must be the configuration of my Apache webserver in front of the Openstack node proxying my public Domain names to the correspondig Servers and or the root directiries and to openstack too. Iv'e updated Apache to 2.4.6 because this version supports websockets and tried hours and nights to configure the alias definitions, of this Apache .......

<VirtualHost *:6080>
    ServerName publicdomainname.biz
    ProxyVia Off
    ProxyRequests On
    ProxyPreserveHost Off
    ProxyPass / http://172.16.0.11:6080/ retry=0
    ProxyPassReverse / http://172.16.0.11:6080/ retry=0
   #ProxyPass /websockify/ ws://172.16.0.11 retry=0
   #ProxyPassReverse /websockify/ ws://172.16.0.11 retry=0
   #ProxyPass /ws/ ws://172.16.0.11:6080/websockify retry=0
   #ProxyPassReverse /ws/ ws://172.16.0.11:6080/websockify retry=0
    ErrorLog logs/cloud.no-ip.biz-vnc-error_log
    CustomLog logs/cloud.no-ip.biz-vnc-access_log common
</VirtualHost>

But till now without success. If anybody has a solution or a hint thanks a lot in advance .....

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2013-11-15 03:32:22 -0500

simone.tiraboschi gravatar image

Are you sure that mod_proxy_wstunnel is enabled and loaded?

The right configuration should be:

<VirtualHost *:6080>
    ServerName publicdomainname.biz
    ProxyPass /websockify/ ws://172.16.0.11/websockify/  retry=0
    ProxyPass / http://172.16.0.11:6080/ retry=0
    ProxyPassReverse / http://172.16.0.11:6080/ retry=0
    ErrorLog logs/cloud.no-ip.biz-vnc-error_log
    CustomLog logs/cloud.no-ip.biz-vnc-access_log common
</VirtualHost>

Pay attention to the trailing / after websockify and remember that ProxyPass will be matched in order so "ProxyPass /websockify/" should come before "ProxyPass /" otherwise it will be shadowed the other. A single ProxyPassReverse should be enought.

ciao

edit flag offensive delete link more

Comments

salü Simone thanks for your reply, your explanation make sense to me hadn't the time yet to test your suggestion. Will post my findings .... ciao

hofi gravatar imagehofi ( 2013-11-15 11:45:50 -0500 )edit
0

answered 2013-11-16 10:01:29 -0500

hofi gravatar image

updated 2013-11-16 10:06:43 -0500

After some thinking about and the hint form Simone i got the solution, the struggling point was the trailing / -> websockify is actually a file and not a directory .....

<VirtualHost *:80>
    ServerName publicdomin.name
    ProxyPreserveHost On
    ProxyPass / http://172.16.0.11/
    ProxyPassReverse / http://172.16.0.11/
</VirtualHost>
#
<VirtualHost *:6080>
    ServerName publicdomain.name
    ProxyPreserveHost On
    ProxyRequests On
    ProxyPass /websockify ws://172.16.0.11:6080/websockify  retry=3
    ProxyPass / http://172.16.0.11:6080/ retry=1
    ProxyPassReverse / http://172.16.0.11:6080/ retry=1
</VirtualHost>

and the console is working like a piece of cake through the Apache websockets proxy ......

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-11-14 11:25:22 -0500

Seen: 2,834 times

Last updated: Nov 16 '13