Having Apache webserver always redirect to Tomcat App Server

Posted on 2008-11-04
Last Modified: 2013-12-02
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

Question by:eric_dd
    LVL 10

    Accepted Solution


    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:

    <META HTTP-EQUIV="Refresh" CONTENT="1; URL=MyApp">

    See here:


    Author Comment

    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)
    LVL 10

    Expert Comment

    >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:

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
    Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now