Re: Web Sockets proxying
Hello All, Finally I was able to talk to Jim Jagielski and he pointed me to the solution: Order allow,deny Allow from all ProxyPassReverse http://localhost:8080/foo ProxyPass ws://demo.foo.org:8080/foo The mapping above will allow proxy both http and websocket requests Maybe someone will find it useful On Thu, Feb 6, 2014 at 7:33 AM, Martin Grigorov wrote: > Hi Maxim, > > It is shame that none of the HTTPD developers responded. > It looks Eric Covener knows as much as I do about mod_proxy_wstunnel ... > If it wasn't possible to make the difference between the protocols then the > web server won't be able to decide whether to use WebSocket endpoint or > http servlet/filter to call the application code. > > Sorry that I cannot help you more. > > Martin Grigorov > Wicket Training and Consulting > > > On Thu, Feb 6, 2014 at 3:17 PM, Maxim Solodovnik >wrote: > > > Hello Martin, > > > > I have asked HTTPD mailing thread: > > http://httpd.markmail.org/thread/zohvqeokryvigpjn > > It seems to be impossible to set proxy on protocol basis. > > > > Maybe it would be possible to do the following: > > create mapping "/ws" inside the application > > make websocket URL to be "ws://host:port/app/ws" on my home page > > > > Thanks in advance > > > > > > On Tue, Jan 28, 2014 at 3:53 PM, Martin Grigorov > >wrote: > > > > > Hi Maxim, > > > > > > You should ask in HTTPD mailing lists. Or whoever maintains > > > mod_proxy_wstunnel. > > > If you split http and ws to be in different mappings (e.g. > /openmeetings > > > (for http) and /ws-openmeetings (for ws)) then you will have to use two > > > elements in your web.xml, one with WicketFilter and another > with > > > JettyWebSocketFilter. The problem here is that both of them will have > > their > > > own Application and Session instances. > > > > > > I think it should be easy for HTTPD to differentiate between the > > protocols > > > and use the correct proxy settings. > > > If they cannot see the difference in the protocols then they won't see > > any > > > difference in the url path too :) > > > > > > Please let us know when you have some progress! > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > > > > > > > On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik < > solomax...@gmail.com > > > >wrote: > > > > > > > Thanks for the quick answer Paul, > > > > > > > > Segmentation fault is definitely caused by me, but I was not sure if > it > > > is > > > > compilation issue or bacuse of my configuration. > > > > > > > > I currently have Apache config like this: > > > > > > > > #WEBSOCKETS > > > >ProxyPass /openmeetings ws://localhost:5080/openmeetings > retry=0 > > > >ProxyPassReverse /openmeetings > ws://localhost:5080/openmeetings > > > > retry=0 > > > > > > > > ProxyPass /openmeetings http://localhost:5080/openmeetings > > > > ProxyPassReverse /openmeetings > > > http://localhost:5080/openmeetings > > > > > > > > As you can see WebSockets mapping is the same as main app mapping > (only > > > > protocol part differs) > > > > I'm afraid segmentation fault might be caused by normal HTML requests > > > > coming instead of WebSocket requests > > > > > > > > This is why I'm asking is there any option to make WebSocket URL > differ > > > > than main app URL? > > > > > > > > > > > > On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: > > > > > > > > > I don't think segmentation faults fall (no pun intended) under > Wicket > > > :) > > > > > > > > > > You might want to look for help under the Unbuntu's user mailing > > lists > > > > > and/or search on Google. > > > > > Here's a starting point for you: > > > > > > > > > > > > > > > > > > > > http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ > > > > > > > > > > > > > > > On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik < > > > solomax...@gmail.com > > > > > >wrote: > > > > > > > > > > > Hello All, > > > > > > Is there any way to perform proxying of web sockets? > > > > > > > > > > > > I have tried mod_proxy_wstunnel but with no luck due to > > > > > > 1) I might compile something to very stable (Segmentation fault > > under > > > > > > Ubuntu 13.10 HTTP 2.4.6) > > > > > > 2) both main app and ws URL are looks the same: > > > > > > http://localhost/openmeetings and ws://localhost/openmeetings. > > > > > > > > > > > > Should I create additional page/mapping for performing ws > > tunneling? > > > > > > Maybe anyone can share example config/how to? > > > > > > > > > > > > Thanks in advance :) > > > > > > > > > > > > -- > > > > > > WBR > > > > > > Maxim aka solomax > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > WBR > > > > Maxim aka solomax > > > > > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: Web Sockets proxying
Hi Maxim, It is shame that none of the HTTPD developers responded. It looks Eric Covener knows as much as I do about mod_proxy_wstunnel ... If it wasn't possible to make the difference between the protocols then the web server won't be able to decide whether to use WebSocket endpoint or http servlet/filter to call the application code. Sorry that I cannot help you more. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:17 PM, Maxim Solodovnik wrote: > Hello Martin, > > I have asked HTTPD mailing thread: > http://httpd.markmail.org/thread/zohvqeokryvigpjn > It seems to be impossible to set proxy on protocol basis. > > Maybe it would be possible to do the following: > create mapping "/ws" inside the application > make websocket URL to be "ws://host:port/app/ws" on my home page > > Thanks in advance > > > On Tue, Jan 28, 2014 at 3:53 PM, Martin Grigorov >wrote: > > > Hi Maxim, > > > > You should ask in HTTPD mailing lists. Or whoever maintains > > mod_proxy_wstunnel. > > If you split http and ws to be in different mappings (e.g. /openmeetings > > (for http) and /ws-openmeetings (for ws)) then you will have to use two > > elements in your web.xml, one with WicketFilter and another with > > JettyWebSocketFilter. The problem here is that both of them will have > their > > own Application and Session instances. > > > > I think it should be easy for HTTPD to differentiate between the > protocols > > and use the correct proxy settings. > > If they cannot see the difference in the protocols then they won't see > any > > difference in the url path too :) > > > > Please let us know when you have some progress! > > > > Martin Grigorov > > Wicket Training and Consulting > > > > > > On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik > >wrote: > > > > > Thanks for the quick answer Paul, > > > > > > Segmentation fault is definitely caused by me, but I was not sure if it > > is > > > compilation issue or bacuse of my configuration. > > > > > > I currently have Apache config like this: > > > > > > #WEBSOCKETS > > >ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 > > >ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings > > > retry=0 > > > > > > ProxyPass /openmeetings http://localhost:5080/openmeetings > > > ProxyPassReverse /openmeetings > > http://localhost:5080/openmeetings > > > > > > As you can see WebSockets mapping is the same as main app mapping (only > > > protocol part differs) > > > I'm afraid segmentation fault might be caused by normal HTML requests > > > coming instead of WebSocket requests > > > > > > This is why I'm asking is there any option to make WebSocket URL differ > > > than main app URL? > > > > > > > > > On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: > > > > > > > I don't think segmentation faults fall (no pun intended) under Wicket > > :) > > > > > > > > You might want to look for help under the Unbuntu's user mailing > lists > > > > and/or search on Google. > > > > Here's a starting point for you: > > > > > > > > > > > > > > http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ > > > > > > > > > > > > On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik < > > solomax...@gmail.com > > > > >wrote: > > > > > > > > > Hello All, > > > > > Is there any way to perform proxying of web sockets? > > > > > > > > > > I have tried mod_proxy_wstunnel but with no luck due to > > > > > 1) I might compile something to very stable (Segmentation fault > under > > > > > Ubuntu 13.10 HTTP 2.4.6) > > > > > 2) both main app and ws URL are looks the same: > > > > > http://localhost/openmeetings and ws://localhost/openmeetings. > > > > > > > > > > Should I create additional page/mapping for performing ws > tunneling? > > > > > Maybe anyone can share example config/how to? > > > > > > > > > > Thanks in advance :) > > > > > > > > > > -- > > > > > WBR > > > > > Maxim aka solomax > > > > > > > > > > > > > > > > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > > > -- > WBR > Maxim aka solomax >
Re: Web Sockets proxying
Hello Martin, I have asked HTTPD mailing thread: http://httpd.markmail.org/thread/zohvqeokryvigpjn It seems to be impossible to set proxy on protocol basis. Maybe it would be possible to do the following: create mapping "/ws" inside the application make websocket URL to be "ws://host:port/app/ws" on my home page Thanks in advance On Tue, Jan 28, 2014 at 3:53 PM, Martin Grigorov wrote: > Hi Maxim, > > You should ask in HTTPD mailing lists. Or whoever maintains > mod_proxy_wstunnel. > If you split http and ws to be in different mappings (e.g. /openmeetings > (for http) and /ws-openmeetings (for ws)) then you will have to use two > elements in your web.xml, one with WicketFilter and another with > JettyWebSocketFilter. The problem here is that both of them will have their > own Application and Session instances. > > I think it should be easy for HTTPD to differentiate between the protocols > and use the correct proxy settings. > If they cannot see the difference in the protocols then they won't see any > difference in the url path too :) > > Please let us know when you have some progress! > > Martin Grigorov > Wicket Training and Consulting > > > On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik >wrote: > > > Thanks for the quick answer Paul, > > > > Segmentation fault is definitely caused by me, but I was not sure if it > is > > compilation issue or bacuse of my configuration. > > > > I currently have Apache config like this: > > > > #WEBSOCKETS > >ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 > >ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings > > retry=0 > > > > ProxyPass /openmeetings http://localhost:5080/openmeetings > > ProxyPassReverse /openmeetings > http://localhost:5080/openmeetings > > > > As you can see WebSockets mapping is the same as main app mapping (only > > protocol part differs) > > I'm afraid segmentation fault might be caused by normal HTML requests > > coming instead of WebSocket requests > > > > This is why I'm asking is there any option to make WebSocket URL differ > > than main app URL? > > > > > > On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: > > > > > I don't think segmentation faults fall (no pun intended) under Wicket > :) > > > > > > You might want to look for help under the Unbuntu's user mailing lists > > > and/or search on Google. > > > Here's a starting point for you: > > > > > > > > > http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ > > > > > > > > > On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik < > solomax...@gmail.com > > > >wrote: > > > > > > > Hello All, > > > > Is there any way to perform proxying of web sockets? > > > > > > > > I have tried mod_proxy_wstunnel but with no luck due to > > > > 1) I might compile something to very stable (Segmentation fault under > > > > Ubuntu 13.10 HTTP 2.4.6) > > > > 2) both main app and ws URL are looks the same: > > > > http://localhost/openmeetings and ws://localhost/openmeetings. > > > > > > > > Should I create additional page/mapping for performing ws tunneling? > > > > Maybe anyone can share example config/how to? > > > > > > > > Thanks in advance :) > > > > > > > > -- > > > > WBR > > > > Maxim aka solomax > > > > > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: Web Sockets proxying
Hi Maxim, You should ask in HTTPD mailing lists. Or whoever maintains mod_proxy_wstunnel. If you split http and ws to be in different mappings (e.g. /openmeetings (for http) and /ws-openmeetings (for ws)) then you will have to use two elements in your web.xml, one with WicketFilter and another with JettyWebSocketFilter. The problem here is that both of them will have their own Application and Session instances. I think it should be easy for HTTPD to differentiate between the protocols and use the correct proxy settings. If they cannot see the difference in the protocols then they won't see any difference in the url path too :) Please let us know when you have some progress! Martin Grigorov Wicket Training and Consulting On Tue, Jan 28, 2014 at 3:24 AM, Maxim Solodovnik wrote: > Thanks for the quick answer Paul, > > Segmentation fault is definitely caused by me, but I was not sure if it is > compilation issue or bacuse of my configuration. > > I currently have Apache config like this: > > #WEBSOCKETS >ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 >ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings > retry=0 > > ProxyPass /openmeetings http://localhost:5080/openmeetings > ProxyPassReverse /openmeetings http://localhost:5080/openmeetings > > As you can see WebSockets mapping is the same as main app mapping (only > protocol part differs) > I'm afraid segmentation fault might be caused by normal HTML requests > coming instead of WebSocket requests > > This is why I'm asking is there any option to make WebSocket URL differ > than main app URL? > > > On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: > > > I don't think segmentation faults fall (no pun intended) under Wicket :) > > > > You might want to look for help under the Unbuntu's user mailing lists > > and/or search on Google. > > Here's a starting point for you: > > > > > http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ > > > > > > On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik > >wrote: > > > > > Hello All, > > > Is there any way to perform proxying of web sockets? > > > > > > I have tried mod_proxy_wstunnel but with no luck due to > > > 1) I might compile something to very stable (Segmentation fault under > > > Ubuntu 13.10 HTTP 2.4.6) > > > 2) both main app and ws URL are looks the same: > > > http://localhost/openmeetings and ws://localhost/openmeetings. > > > > > > Should I create additional page/mapping for performing ws tunneling? > > > Maybe anyone can share example config/how to? > > > > > > Thanks in advance :) > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > > > -- > WBR > Maxim aka solomax >
Re: Web Sockets proxying
Again, this is not related to Wicket, but... Try turning off the webapp and preserve only the websocket one. Do you still get your seg fault? Have a great day, Paul Bors > On Jan 27, 2014, at 9:24 PM, Maxim Solodovnik wrote: > > Thanks for the quick answer Paul, > > Segmentation fault is definitely caused by me, but I was not sure if it is > compilation issue or bacuse of my configuration. > > I currently have Apache config like this: > >#WEBSOCKETS > ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 > ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings > retry=0 > >ProxyPass /openmeetings http://localhost:5080/openmeetings >ProxyPassReverse /openmeetings http://localhost:5080/openmeetings > > As you can see WebSockets mapping is the same as main app mapping (only > protocol part differs) > I'm afraid segmentation fault might be caused by normal HTML requests > coming instead of WebSocket requests > > This is why I'm asking is there any option to make WebSocket URL differ > than main app URL? > > >> On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: >> >> I don't think segmentation faults fall (no pun intended) under Wicket :) >> >> You might want to look for help under the Unbuntu's user mailing lists >> and/or search on Google. >> Here's a starting point for you: >> >> http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ >> >> >> On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik >> wrote: >> >>> Hello All, >>> Is there any way to perform proxying of web sockets? >>> >>> I have tried mod_proxy_wstunnel but with no luck due to >>> 1) I might compile something to very stable (Segmentation fault under >>> Ubuntu 13.10 HTTP 2.4.6) >>> 2) both main app and ws URL are looks the same: >>> http://localhost/openmeetings and ws://localhost/openmeetings. >>> >>> Should I create additional page/mapping for performing ws tunneling? >>> Maybe anyone can share example config/how to? >>> >>> Thanks in advance :) >>> >>> -- >>> WBR >>> Maxim aka solomax > > > > -- > WBR > Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Web Sockets proxying
Thanks for the quick answer Paul, Segmentation fault is definitely caused by me, but I was not sure if it is compilation issue or bacuse of my configuration. I currently have Apache config like this: #WEBSOCKETS ProxyPass /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPassReverse /openmeetings ws://localhost:5080/openmeetings retry=0 ProxyPass /openmeetings http://localhost:5080/openmeetings ProxyPassReverse /openmeetings http://localhost:5080/openmeetings As you can see WebSockets mapping is the same as main app mapping (only protocol part differs) I'm afraid segmentation fault might be caused by normal HTML requests coming instead of WebSocket requests This is why I'm asking is there any option to make WebSocket URL differ than main app URL? On Tue, Jan 28, 2014 at 4:27 AM, Paul Bors wrote: > I don't think segmentation faults fall (no pun intended) under Wicket :) > > You might want to look for help under the Unbuntu's user mailing lists > and/or search on Google. > Here's a starting point for you: > > http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ > > > On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik >wrote: > > > Hello All, > > Is there any way to perform proxying of web sockets? > > > > I have tried mod_proxy_wstunnel but with no luck due to > > 1) I might compile something to very stable (Segmentation fault under > > Ubuntu 13.10 HTTP 2.4.6) > > 2) both main app and ws URL are looks the same: > > http://localhost/openmeetings and ws://localhost/openmeetings. > > > > Should I create additional page/mapping for performing ws tunneling? > > Maybe anyone can share example config/how to? > > > > Thanks in advance :) > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: Web Sockets proxying
I don't think segmentation faults fall (no pun intended) under Wicket :) You might want to look for help under the Unbuntu's user mailing lists and/or search on Google. Here's a starting point for you: http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik wrote: > Hello All, > Is there any way to perform proxying of web sockets? > > I have tried mod_proxy_wstunnel but with no luck due to > 1) I might compile something to very stable (Segmentation fault under > Ubuntu 13.10 HTTP 2.4.6) > 2) both main app and ws URL are looks the same: > http://localhost/openmeetings and ws://localhost/openmeetings. > > Should I create additional page/mapping for performing ws tunneling? > Maybe anyone can share example config/how to? > > Thanks in advance :) > > -- > WBR > Maxim aka solomax >