httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: [users@httpd] apache 2.2.2 and talking to Tomcat 5.5 via ProxyPass
Date Thu, 06 Jul 2006 15:37:58 GMT
>> 1.  I hope you have beside your
>>   ProxyPass /mytomcatapp ajp://
>> a line 
>>   ProxyPassReserve /mytomcatapp ajp://
>> and/or
>>   ProxyPreserveHost On
>Did not have the ProxyPreserveHost On, but did have ProxyPassReverse.

>> 2. Either you put the stylesheets for your relative names on the apache or
>> you have to put all your stylesheets and javascripts under a proxied path.
>Would I need a proxied path such as:
>ProxyPass /mytomcatapp
>(and ProxyPassReverse) in addition to the ajp ?  Or should I list them
>separatedly such as:
>ProxyPass /mytomcatapp/stylesheets
No, you don't need both "http" and "ajp". Only one is sufficient.
And if you want a stylesheet from tomcat you can still use "ajp".
All what comes after "/mytomcatapp" [e.g. stylesheets inside /mytomcatapp/stylesheets]
is proxied to tomcat.

So these two lines are sufficient 

  ProxyPass        /mytomcatapp ajp://
  ProxyPassReserve /mytomcatapp ajp://

The next thing what you should take care are your relative Links inside your application
If you have inside your "/mytomcatapp/example.jsp" a link  to "../pictures/image.jpg",
than you have to insert 2 more lines 
  ProxyPass        /pictures  ajp://
  ProxyPassReserve /pictures  ajp://

what here will not work is a link to "../image.jpg",
this will be served than by Apache and not by tomcat. To go around this,
than you have to proxy all things to Tomcat

  ProxyPass        /  ajp://
  ProxyPassReserve /  ajp://

>Thanks again...



View raw message