Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

how to configure ProxyPass for tomcat for app which generates url at root /

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


jamesgodrej at yahoo

Feb 23, 2011, 11:39 PM

Post #1 of 3 (724 views)
Permalink
how to configure ProxyPass for tomcat for app which generates url at root /

I basically have 2 applications
http://sakai.openitup.in
http://olat.openitup.in
we wanted both of these to be accessible as
http://research.openitup.in/sakai
http://research.openitup.in/olat
and a website http://reserach.openitup.in which is separate from both of these
but what I found was if I proxy root of these apps (sakai and olat)
using a URL for these apps only (i.e. sakai.openitup.in and olat.openitup.in)
then things work.
i.e.
vhost for sakai.openitup.in
<VirtualHost *:80 >

ServerName sakai.openitup.in
ProxyPass / ajp://192.168.1.14:8009/
ProxyPassReverse / ajp://192.168.1.14:8009/

</VirtualHost>

and for olat another vhost

<VirtualHost *:80 >

ServerName olat.openitup.in
ProxyPass / ajp://192.168.1.15:8009/
ProxyPassReverse / ajp://192.168.1.15:8009/

</VirtualHost>

then things work.
But if I use in the vhost research.openitup.in

<VirtualHost *:80 >
ServerName research.openitup.in

ProxyPass /sakai ajp://192.168.1.14:8009/
ProxyPassReverse /sakai ajp://192.168.1.14:8009/

ProxyPass /olat ajp://192.168.1.15:8009/
ProxyPassReverse /olat ajp://192.168.1.15:8009/


ProxyPass / http://192.168.1.14
ProxyPassReverse / http://192.168.1.14
</VirtualHost>

in the vhost of research.openitup.in then
http://research.openitup.in/sakai
http://research.openitup.in/olat
are not accessible.

If you notice I have forwarded root of research.openitup.in to an internal
machine.
Which is where it actually is so ProxyPass / for research.openitup.in is needed.

So in this situation what can be a possible solution for me so that I can access
http://research.openitup.in/sakai
and not http://sakai.openitup.in and same for olat

http://research.openitup.in/olat

and not http://olat.openitup.in

Let me know if some one has some suggestion for this part.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


krist.vanbesien at gmail

Feb 25, 2011, 3:57 AM

Post #2 of 3 (710 views)
Permalink
Re: how to configure ProxyPass for tomcat for app which generates url at root / [In reply to]

On Thu, Feb 24, 2011 at 8:39 AM, James Godrej <jamesgodrej [at] yahoo> wrote:

> Let me know if some one has some suggestion for this part.

Firstly: Have you correctly configured mod_jk? Do you have a mod_jk
log file? What is in it? What is in your error log?

Secondlyl: If in ProxyPass the LHS ends in a / the RHS must end in a
slash too. But better not use slash at all:
ProxyPass /sakai ajp://192.168.1.14:8009

And have a look at what links your application generates. ProxyPass
and ProxyPassReverse do not change anything in the content of the html
returned by the app. You can use mod_proxyhtml to mangle the html for
you, but a better solution is to make your application aware of the
fact that it is behind a proxy.
Look at the documentation of the application and see if there is a
configuration setting to define the base URL, and set that to
http://research.openitup.in/sakai

Krist

--
krist.vanbesien [at] gmail
krist [at] vanbesien
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


mwood at IUPUI

Feb 25, 2011, 9:16 AM

Post #3 of 3 (693 views)
Permalink
Re: how to configure ProxyPass for tomcat for app which generates url at root / [In reply to]

On Fri, Feb 25, 2011 at 12:57:28PM +0100, Krist van Besien wrote:
> On Thu, Feb 24, 2011 at 8:39 AM, James Godrej <jamesgodrej [at] yahoo> wrote:
>
> > Let me know if some one has some suggestion for this part.
>
> Firstly: Have you correctly configured mod_jk? Do you have a mod_jk
> log file? What is in it? What is in your error log?

If he's using ProxyPass for this, then mod_jk is irrelevant; this is
using mod_proxy and mod_proxy_ajp.

--
Mark H. Wood, Lead System Programmer mwood [at] IUPUI
Asking whether markets are efficient is like asking whether people are smart.

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.