Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to configure Apache as Reverse Proxy for RAP Application(HTTP ERRROR 404.)
How to configure Apache as Reverse Proxy for RAP Application [message #1281295] Mon, 31 March 2014 17:18 Go to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Hi,

I am struggling with getting an Apache server as Reverse Proxy for a RAP-2.2 application. I realize this is probably a question for an Apache forum, but I have the feeling the problem is specific to the nature of RAP applications.

Everything is working fine EXCEPT that the first time the browser hits the site, I ALWAYS get this jetty error in the browser:

HTTP ERROR: 404

Problem accessing /mycontextmycontext;jsessionid=8mwr5mq62b8r1a4gt5c2skm2o. Reason:

ProxyServlet: /mycontextmycontext;jsessionid=8mwr5mq62b8r1a4gt5c2skm2o

If I open the link a second time, all is well.

In my Apache virtual host entry I have:

ProxyPass /rwt-resources http://192.169.1.10:12345/rwt-resources
ProxyPass /mycontext http://192.168.0.10:12345/mycontext
ProxyPass / http://192.168.0.10:12345/mycontext

ProxyPassReverse / http://192.168.0.10:12345/mycontext


Any suggestion is highly appreciated.
Re: How to configure Apache as Reverse Proxy for RAP Application [message #1281509 is a reply to message #1281295] Tue, 01 April 2014 01:10 Go to previous messageGo to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Not quite sure if this is the preferred solution, but the settings below seem to work, as long as the context is passed into the URL: http://theserver.com/mycontext

# We need the balancer the pass the sessionId on to Jetty.
ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPass /rwt-resources balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
<Proxy balancer://mycluster>
    BalancerMember http://192.168.1.10:12345
</Proxy> 


Cheers,

E.
Re: How to configure Apache as Reverse Proxy for RAP Application [message #1282954 is a reply to message #1281295] Thu, 03 April 2014 00:01 Go to previous message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
With the configuration below it is possible to access the site w/o specifying the context (http://myhost.com) instead of http://myhost.com/mycontext

    # The order of the lines below is important.
    ProxyPass   /rwt-resources http://192.168.1.10:12345/rwt-resources
    # We need the ProxyPassMatch here so we can pass:
    # /mycontext;jsessionid=180n7dktdjjld3tl11pd9ufof on to Jetty
    ProxyPassMatch   ^/(mycontext.*)$   http://192.168.1.10:12345/$1

    ProxyPassReverse /mycontext     http://192.168.1.10:12345/mycontext
    ProxyPassReverse /rwt-resources http://192.168.1.10:12345/rwt-resources

    ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
    <Proxy balancer://mycluster>
        BalancerMember http://192.168.1.10:12345/mycontext/
    </Proxy>
Previous Topic:RWT Standalone WAR to WebLogic contextDirectory null
Next Topic:RAP detach parts to a new window
Goto Forum:
  


Current Time: Fri Apr 19 12:48:40 GMT 2024

Powered by FUDForum. Page generated in 0.01677 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top