You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tapas Mishra <mi...@gmail.com> on 2010/07/12 18:53:32 UTC

running tomcat behind an apache reverse proxy

I have an application named as sakai
You can check about it here
http://sakaiproject.org/new-sakai-faq

which is running in Tomcat on LAN as
http://192.168.1.5:9090/portal

I am using Apache as front end for users to access this application on internet
as http://mydomain.com/sakai

and
ProxyPass /sakai http://192.168.1.1:9090/portal
ProxyPassReverse /sakai http://192.168.1.1:9090/portal


but the application is not generating URLs properly.I have not written
so it is not possible for me to change any thing in it.
The application is generating URLs like this:

GET /library/skin/default/portal.css
GET /portal/styles/portalstyles.css
GET /library/js/jquery.js

mod_proxy does not rewrite HTML, only a few specific headers, so your
application must generate the correct URLs, eg
/'sakai/styles/portalstyles.css'.

Is there any work around ?
 I have asked this on Sakai forum but did not got any answer.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: running tomcat behind an apache reverse proxy

Posted by Rainer Jung <ra...@kippdata.de>.
On 12.07.2010 19:00, Mark Thomas wrote:
> On 12/07/2010 17:53, Tapas Mishra wrote:
>> but the application is not generating URLs properly.I have not written
>> so it is not possible for me to change any thing in it.
>> The application is generating URLs like this:
>>
>> GET /library/skin/default/portal.css
>> GET /portal/styles/portalstyles.css
>> GET /library/js/jquery.js
>>
>> mod_proxy does not rewrite HTML, only a few specific headers, so your
>> application must generate the correct URLs, eg
>> /'sakai/styles/portalstyles.css'.
>>
>> Is there any work around ?
>>   I have asked this on Sakai forum but did not got any answer.
>
> mod_substitute

... or mod_proxy_html ...

Or: you can try to fix it on the incoming side instead of the outgoing, 
i.e. rewriting /portal/styles.* to /sakai/styles/* after you received 
the request, but before forwarding to Tomcat (mod_rewrite).

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: running tomcat behind an apache reverse proxy

Posted by Mark Thomas <ma...@apache.org>.
On 12/07/2010 17:53, Tapas Mishra wrote:
> but the application is not generating URLs properly.I have not written
> so it is not possible for me to change any thing in it.
> The application is generating URLs like this:
> 
> GET /library/skin/default/portal.css
> GET /portal/styles/portalstyles.css
> GET /library/js/jquery.js
> 
> mod_proxy does not rewrite HTML, only a few specific headers, so your
> application must generate the correct URLs, eg
> /'sakai/styles/portalstyles.css'.
> 
> Is there any work around ?
>  I have asked this on Sakai forum but did not got any answer.

mod_substitute

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org