• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Integrating Tomcat and Apache - URL Problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I am attempting to integrate Tomcat (5.0.28) and Apache (2.0.54) by following the instructions at: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/proxy-howto.html.

So, I have two lines in my httpd.conf that look like this:

ProxyPass /myapp http://mydomain.com:8081
ProxyPassReverse /myapp http://mydomain.com:8081

And I have a line in my server.xml file that looks like this:

<Connector port="8081" proxyPort="80" proxyName="www.mydomain.com"/>

This works . . . sort of.

When I point my browser to "mydomain.com/myapp", the "Welcome to Tomcat" screen comes up, but not the images. Their addresses all lack the "/myapp" part, so of course they're broken E.g., "http://www.mydomain.com/tomcat.gif" should be "http://www.mydomain.com/myapp/tomcat.gif", but it's not.

This further complicates things if I want to go to the manager application --- by manually entering the address with the "/myapp" section, I do ok. But that's annoying.

I know that there must be a simple solution to this --- I am just not finding it.



Thanks.
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It has been a while, so I can't confirm this.

But I believe you can resolve this issue by setting the DocumentRoot directive in the httpd.conf to the directory location of your static content i.e. html, .gif and .jpg etc. Keep in mind, this directive is only allowed in designated areas.

I would also recommend you take look at the documentation of the DocumentRoot directive.
 
reply
    Bookmark Topic Watch Topic
  • New Topic