You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Maxim Solodovnik <so...@apache.org> on 2014/01/29 17:55:47 UTC
[users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel on the same URL
(different protocols)
Hello,
Is it possible to set up proxying of
http://mysite/openmeetings to http://localhost:5080/openmeetings
and same time
ws://mysite/openmeetings to ws://localhost:5080/openmeetings
What I have tried
Install apache httpd on Ubuntu 13.10 server (2.4.6 using apt-get)
Checkout
http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy_wstunnel.c
http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy.h
(2.4.7 sources were used since I got seg faults with 2.4.6)
build using
apxs2 -aic -I/usr/include/libxml2 ./mod_proxy_wstunnel.c
1) Add following lines to the config:
<Location /openmeetings>
Order allow,deny
Allow from all
ProxyPass http://localhost:5080/openmeetings
ProxyPassReverse http://localhost:5080/openmeetings
ProxyPass ws://localhost:5080/openmeetings
ProxyPassReverse ws://localhost:5080/openmeetings
</Location>
2) restart apache
perform steps 1 and 2 commenting different lines
No luck :(
Can someone please help me?
Thanks in advance!
Re: [users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel on
the same URL (different protocols)
Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks Eric,
Will try to workaround this
On Thu, Feb 6, 2014 at 8:31 PM, Eric Covener <co...@gmail.com> wrote:
> On Thu, Feb 6, 2014 at 2:51 AM, Maxim Solodovnik <so...@gmail.com>
> wrote:
> > Can someone please tell me is it possible to proxy resources based on
> > protocol?
> > http://some_url will go to http://localhost:8080/someurl
> > ws://some_url will go to ws://localhost:8080/someurl
>
> I don't think so, those aren't actually different URLs when they hit
> the webserver. They are both requests to /some_url.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
WBR
Maxim aka solomax
Re: [users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel on
the same URL (different protocols)
Posted by Eric Covener <co...@gmail.com>.
On Thu, Feb 6, 2014 at 2:51 AM, Maxim Solodovnik <so...@gmail.com> wrote:
> Can someone please tell me is it possible to proxy resources based on
> protocol?
> http://some_url will go to http://localhost:8080/someurl
> ws://some_url will go to ws://localhost:8080/someurl
I don't think so, those aren't actually different URLs when they hit
the webserver. They are both requests to /some_url.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel on
the same URL (different protocols)
Posted by Maxim Solodovnik <so...@gmail.com>.
Can someone please tell me is it possible to proxy resources based on
protocol?
http://some_url will go to http://localhost:8080/someurl
ws://some_url will go to ws://localhost:8080/someurl
On Thu, Jan 30, 2014 at 12:19 AM, Maxim Solodovnik <so...@gmail.com>wrote:
> The following configuration works as expected (css files, images js
> scripts, json requests are working)
> <Location /openmeetings>
> Order allow,deny
> Allow from all
> ProxyPass http://localhost:5080/openmeetings
> ProxyPassReverse http://localhost:5080/openmeetings
> </Location>
>
> Web socket connection is failed
>
> adding
> <Location /openmeetings>
> Order allow,deny
> Allow from all
> ProxyPass ws://localhost:5080/openmeetings
> ProxyPassReverse ws://localhost:5080/openmeetings
>
> ProxyPass http://localhost:5080/openmeetings
> ProxyPassReverse http://localhost:5080/openmeetings
>
> </Location>
>
> send all requests to ws://* (I guess) So I haven't receive any resources
>
> adding
> <Location /openmeetings>
> Order allow,deny
> Allow from all
> ProxyPass ws://localhost:5080/openmeetings
>
> ProxyPass http://localhost:5080/openmeetings
> </Location>
> All resources other than html are not working :( (WebSocket connection is
> made by JavaScript so I have no idea if it is working or not ...)
>
> I need same URL for http:// and ws://
>
>
>
> On Thu, Jan 30, 2014 at 12:10 AM, <ya...@seiner.com> wrote:
>
>> > Hello,
>> >
>> > Is it possible to set up proxying of
>> > http://mysite/openmeetings to http://localhost:5080/openmeetings
>> > and same time
>> > ws://mysite/openmeetings to ws://localhost:5080/openmeetings
>> >
>> > What I have tried
>> > Install apache httpd on Ubuntu 13.10 server (2.4.6 using apt-get)
>> > Checkout
>> >
>> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy_wstunnel.c
>> >
>> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy.h
>> >
>> > (2.4.7 sources were used since I got seg faults with 2.4.6)
>> >
>> >
>> > build using
>> > apxs2 -aic -I/usr/include/libxml2 ./mod_proxy_wstunnel.c
>> >
>> > 1) Add following lines to the config:
>> >
>> > <Location /openmeetings>
>> > Order allow,deny
>> > Allow from all
>> > ProxyPass http://localhost:5080/openmeetings
>> > ProxyPassReverse http://localhost:5080/openmeetings
>> >
>> > ProxyPass ws://localhost:5080/openmeetings
>> > ProxyPassReverse ws://localhost:5080/openmeetings
>> > </Location>
>> >
>> > 2) restart apache
>> >
>> > perform steps 1 and 2 commenting different lines
>> > No luck :(
>>
>> What does "No luck" mean?
>>
>> This is the setup I am stuggling with....
>>
>> It (almost) works. It handles cookies but fails to handle URLs in
>> javascript (I think). At least all my javascript content is broken and
>> some static images fail to load, and I think those are being loaded from
>> javascript. (I did not develop the content, I am just trying to proxy it.)
>>
>> I'd suggest you get the http proxy working first and then handle the rest.
>>
>> ProxyHTMLURLMap http://127.0.0.1:8002 /ap/Downstairs
>> <location /ap/Downstairs>
>> # DefaultType text/html
>> SetOutputFilter proxy-html
>> ProxyHTMLExtended On
>> RequestHeader unset Accept-Encoding
>> ProxyPass http://127.0.0.1:8002/
>> ProxyPassReverse http://127.0.0.1:8002
>> ProxyHTMLURLMap / /ap/Downstairs/
>> ProxyPassReverseCookiePath / /ap/Downstairs/
>> </location>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> WBR
> Maxim aka solomax
>
--
WBR
Maxim aka solomax
Re: [users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel on
the same URL (different protocols)
Posted by Maxim Solodovnik <so...@gmail.com>.
The following configuration works as expected (css files, images js
scripts, json requests are working)
<Location /openmeetings>
Order allow,deny
Allow from all
ProxyPass http://localhost:5080/openmeetings
ProxyPassReverse http://localhost:5080/openmeetings
</Location>
Web socket connection is failed
adding
<Location /openmeetings>
Order allow,deny
Allow from all
ProxyPass ws://localhost:5080/openmeetings
ProxyPassReverse ws://localhost:5080/openmeetings
ProxyPass http://localhost:5080/openmeetings
ProxyPassReverse http://localhost:5080/openmeetings
</Location>
send all requests to ws://* (I guess) So I haven't receive any resources
adding
<Location /openmeetings>
Order allow,deny
Allow from all
ProxyPass ws://localhost:5080/openmeetings
ProxyPass http://localhost:5080/openmeetings
</Location>
All resources other than html are not working :( (WebSocket connection is
made by JavaScript so I have no idea if it is working or not ...)
I need same URL for http:// and ws://
On Thu, Jan 30, 2014 at 12:10 AM, <ya...@seiner.com> wrote:
> > Hello,
> >
> > Is it possible to set up proxying of
> > http://mysite/openmeetings to http://localhost:5080/openmeetings
> > and same time
> > ws://mysite/openmeetings to ws://localhost:5080/openmeetings
> >
> > What I have tried
> > Install apache httpd on Ubuntu 13.10 server (2.4.6 using apt-get)
> > Checkout
> >
> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy_wstunnel.c
> >
> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy.h
> >
> > (2.4.7 sources were used since I got seg faults with 2.4.6)
> >
> >
> > build using
> > apxs2 -aic -I/usr/include/libxml2 ./mod_proxy_wstunnel.c
> >
> > 1) Add following lines to the config:
> >
> > <Location /openmeetings>
> > Order allow,deny
> > Allow from all
> > ProxyPass http://localhost:5080/openmeetings
> > ProxyPassReverse http://localhost:5080/openmeetings
> >
> > ProxyPass ws://localhost:5080/openmeetings
> > ProxyPassReverse ws://localhost:5080/openmeetings
> > </Location>
> >
> > 2) restart apache
> >
> > perform steps 1 and 2 commenting different lines
> > No luck :(
>
> What does "No luck" mean?
>
> This is the setup I am stuggling with....
>
> It (almost) works. It handles cookies but fails to handle URLs in
> javascript (I think). At least all my javascript content is broken and
> some static images fail to load, and I think those are being loaded from
> javascript. (I did not develop the content, I am just trying to proxy it.)
>
> I'd suggest you get the http proxy working first and then handle the rest.
>
> ProxyHTMLURLMap http://127.0.0.1:8002 /ap/Downstairs
> <location /ap/Downstairs>
> # DefaultType text/html
> SetOutputFilter proxy-html
> ProxyHTMLExtended On
> RequestHeader unset Accept-Encoding
> ProxyPass http://127.0.0.1:8002/
> ProxyPassReverse http://127.0.0.1:8002
> ProxyHTMLURLMap / /ap/Downstairs/
> ProxyPassReverseCookiePath / /ap/Downstairs/
> </location>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
WBR
Maxim aka solomax
Re: [users@httpd] Configuring mod_proxy_hml and mod_proxy_wstunnel
on the same URL (different protocols)
Posted by ya...@seiner.com.
> Hello,
>
> Is it possible to set up proxying of
> http://mysite/openmeetings to http://localhost:5080/openmeetings
> and same time
> ws://mysite/openmeetings to ws://localhost:5080/openmeetings
>
> What I have tried
> Install apache httpd on Ubuntu 13.10 server (2.4.6 using apt-get)
> Checkout
> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy_wstunnel.c
> http://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.7/modules/proxy/mod_proxy.h
>
> (2.4.7 sources were used since I got seg faults with 2.4.6)
>
>
> build using
> apxs2 -aic -I/usr/include/libxml2 ./mod_proxy_wstunnel.c
>
> 1) Add following lines to the config:
>
> <Location /openmeetings>
> Order allow,deny
> Allow from all
> ProxyPass http://localhost:5080/openmeetings
> ProxyPassReverse http://localhost:5080/openmeetings
>
> ProxyPass ws://localhost:5080/openmeetings
> ProxyPassReverse ws://localhost:5080/openmeetings
> </Location>
>
> 2) restart apache
>
> perform steps 1 and 2 commenting different lines
> No luck :(
What does "No luck" mean?
This is the setup I am stuggling with....
It (almost) works. It handles cookies but fails to handle URLs in
javascript (I think). At least all my javascript content is broken and
some static images fail to load, and I think those are being loaded from
javascript. (I did not develop the content, I am just trying to proxy it.)
I'd suggest you get the http proxy working first and then handle the rest.
ProxyHTMLURLMap http://127.0.0.1:8002 /ap/Downstairs
<location /ap/Downstairs>
# DefaultType text/html
SetOutputFilter proxy-html
ProxyHTMLExtended On
RequestHeader unset Accept-Encoding
ProxyPass http://127.0.0.1:8002/
ProxyPassReverse http://127.0.0.1:8002
ProxyHTMLURLMap / /ap/Downstairs/
ProxyPassReverseCookiePath / /ap/Downstairs/
</location>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org