httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Oliver.Scha...@unilog.de>
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://127.0.0.1:8009/mytomcatapp
>> a line 
>>   ProxyPassReserve /mytomcatapp ajp://127.0.0.1:8009/mytomcatapp
>> and/or
>>   ProxyPreserveHost On
>>
>>   
>Did not have the ProxyPreserveHost On, but did have ProxyPassReverse.
OK

>> 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 http://127.0.0.1:8009/mytomcatapp
>(and ProxyPassReverse) in addition to the ajp ?  Or should I list them
>separatedly such as:
>ProxyPass /mytomcatapp/stylesheets
>http://127.0.0.1:8009/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://127.0.0.1:8009/mytomcatapp
  ProxyPassReserve /mytomcatapp ajp://127.0.0.1:8009/mytomcatapp

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://127.0.0.1:8009/pictures
  ProxyPassReserve /pictures  ajp://127.0.0.1:8009/pictures

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://127.0.0.1:8009/
  ProxyPassReserve /  ajp://127.0.0.1:8009/


>Thanks again...

:-)
bye

oliver

Mime
View raw message