You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ananya Dey <an...@gmail.com> on 2018/01/05 09:46:58 UTC

Re: [users@httpd] How to connect Apache and Tomcat using http2 protocol

Hi ,

I am trying to connect Apache httpd and tomcat using websockets protocol. I
am supposed to use ws tunnel but the tomcat homepage is not loading with it.
This is how I am connecting it.
ProxyRequests On
<Location /ananya>
        ProxyPass "ws://15.213.91.33:10905/test"
</Location>

It 's not loading it. However, if instead I use the below, it is loading.
ProxyRequests On
<Location /ananya>
        ProxyPass "http://15.213.91.33:10905/test"
</Location>
Can someone please give me a solution for this.

Thanks and regards,
Ananya

On Wed, Dec 13, 2017 at 11:52 AM, Ananya Dey <an...@gmail.com> wrote:

> Hi, thanks for your help :) Http2 is working fine now. But I want to check
> for Web sockets protocol.
>
> When I use ProxyPass with 'http' , it is running fine.
> But according to the documentation, if I use 'ws' with proxypass then it
> is not loading.
> This is the code snippet:
>
> ProxyRequests On
> <Location /ananya>
>         ProxyPass "ws://15.213.91.33:10905/test"
> </Location>
>
> Can someone please help me out.
> Thanks and regards,
> Ananya
>
> On Tue, Dec 12, 2017 at 11:33 PM, Luca Toscano <to...@gmail.com>
> wrote:
>
>> Hi!
>>
>> 2017-12-12 6:48 GMT+01:00 Ananya Dey <an...@gmail.com>:
>>
>>> Hi
>>>
>>> I am trying to connect Apache and Tomcat using HTTP2 protocol.
>>> 1. These are the changes that I have made in my server.xml.
>>>  <Connector port="10905" protocol="org.apache.coyote.ht
>>> tp11.Http11NioProtocol"
>>>                maxThreads="150" SSLEnabled="false"
>>>    sslImplementationName="org.apache.tomcat.util.net.openssl.O
>>> penSSLImplementation">
>>>         <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"
>>> />
>>>         <SSLHostConfig>
>>>             <Certificate certificateKeyFile="/home/anan
>>> ya/tomcat_server1/apache-tomcat-8.5.23/conf/server.key"
>>>                          certificateFile="/home/ananya
>>> /tomcat_server1/apache-tomcat-8.5.23/conf/server.crt"/>
>>>         </SSLHostConfig>
>>>     </Connector>
>>> 2. In my httpd.conf,
>>> I have added
>>> Protocols h2
>>> LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
>>> LoadModule http2_module modules/mod_http2.so
>>>
>>> and ProxyPass "http://15.213.91.33:10905/"
>>>
>>> But through the various tests, it is mostly concluded that it supports
>>> websocket protocol using http proxy. But not supporting http2.
>>> Can someone please help me out??
>>>
>>
>> I think that you'd need to try https://httpd.apache.org/d
>> ocs/2.4/mod/mod_proxy_http2.html.
>>
>> Hope that helps!
>>
>> Luca
>>
>>
>

Re: [users@httpd] How to connect Apache and Tomcat using http2 protocol

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jan 5, 2018 at 4:46 AM, Ananya Dey <an...@gmail.com> wrote:

> Hi ,
>
> I am trying to connect Apache httpd and tomcat using websockets protocol.
> I am supposed to use ws tunnel but the tomcat homepage is not loading with
> it.
>

​You would normally use websockets only on a websockets endpoint on the
backend, not for a "homepage".