Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

httpd to tomcat proxy question regarding redirects

Status
Not open for further replies.

f0rmat

IS-IT--Management
Jun 2, 2004
102
US
Hi there,
I have an apache(httpd) server that acts as a proxy to tomcat. I want to achieve the following, but am having a little bit of trouble..

I have a webapp deployed in tomcat called info.war. I can access this in tomcat via or.. I can go to and have apache redirect me to tomcat to
These both work fine.

What I need to achieve is this...

I need to be able to go to and have that redirect me to my info webapp(stored in /usr/local/tomcat/current/webapps/info/) at a url of (essentially the same as it's working above, just with a few more layers involved).

Where do I begin looking? Is this an apache change? or a tomcat change? Also, the change needs to not be a global change as I'm deploying this into a tomcat appserver that serves other applications, so it'll have to be specific to this one little guy.

Cheers,
-Derek
 
In your apache config file (or files) add [blue]index.jsp[/blue] to the existing [green]DirectoryIndex[/green] file list. Apache will serve these files when a directory is requested.

You can also use [green]AddDirectoryIndex[/green] if you want to add files to the list in a custom config file.

 
If you want to make this "local" enable indexes on the directory and use a DirectoryIndex in .htaccess.

Another easy way is if it goes to index.html, stick a metarefresh to index.jsp, which doesn't require a apache change.
 
I don't quite understand the responses. My server is already looking for index.jsp in the directory index, otherwise going to would not bring up
What I need to do is be able to go to and have that know that it is supposed to serve the webapp I have deployed in catalina_home/webapp/info. Currently the webapp is being served from localhost/info (which makes sense because it's deployed in the webapps container, as opposed in /root.

I need to do a redirect(or a re-route), not serve the jsp, that I have done already. I just don't know exactly how to achieve this redirect. I also, don't want to have to have a requirement to exist in able to do that.. i.e. i dont want to simply redirect to I want it to become what exists at i.e. have my info webapp be served at the address of
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top