Having Apache webserver always redirect to Tomcat App Server

Experts & all,

I have an Apache Webserver that currently uses mod_jk to commnunicate to the Tomcat Appserver and that works flawlessly.

What I am trying to figure out is how NOT to show the Tomcat webpage but always have the webserver redirect or rewrite so that the default is ALWAYS my application running on the Appserver.

Right now if my users enter the public IP address (for example and only the IP address, the Tomcat default webpage shows up. How can I have the public IP address always point to, where MyApp is my applications that runs in the appserver.

- Eric

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


change the index.html page of your apache document. It should contain a HTML redirect to your application URL.

Basically you need this in the html file:


See here: http://billstclair.com/html-redirect2.html


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eric_ddAuthor Commented:
Hi Kurt,

That works great :), so here are your points. I am not to sure if the following will be considered another question, but, I dont want to loose the tomcat page, so i renamed it to tomcat.html. How can I only allow loading this page from the 8080, i.e. prevent port 80 and 443 from seeing this (or all ports except 8080)
>How can I only allow loading this page from the 8080, i.e. prevent port 80 and 443 from seeing this (or all ports except 8080)

it really depends how you configured apache and tomcat to co-operate. There are some pretty good tutorials out there:

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.