Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:36:09+00:00 2026-06-05T21:36:09+00:00

I have apache httpd that I want to proxy to two different tomcat servers.

  • 0

I have apache httpd that I want to proxy to two different tomcat servers.

I see this:
http://tomcat.apache.org/connectors-doc-archive/jk2/proxy.html

But that is only for one tomcat server. What if I had one server running on 8081 in addition to a tomcat running at 8080?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:36:10+00:00Added an answer on June 5, 2026 at 9:36 pm

    Apache httpd two out-of-the-box options for proxying to any number of backend Tomcat instances:

    1. mod_proxy_http
    2. mod_proxy_ajp

    They are configured identically to each other, except that the former uses the HTTP protocol for communication and the latter uses the AJP protocol and URLs that start with ajp:// instead of http:// for the backend server. Both can be configured for load-balancing, failover, etc. in the same way. You can proxy to completely separate Tomcat instances (i.e. no load-balancing: just separate backends) by providing separate proxy configuration for separate URL spaces (e.g. /app1 -> Tomcat1 and /app2 -> Tomcat2) or you can configure the two (or more) backend instances for load-balancing, etc.

    Specifically, look at the documentation for the following httpd configuration directives:

    <Proxy>
    BalanceMember
    ProxyPass
    ProxyPassReverse
    

    You can find documentation for all of these here:

    1. http://httpd.apache.org/docs/2.2/mod/mod_proxy.html (General)
    2. http://httpd.apache.org/docs/2.2/mod/mod_proxy_http.html (HTTP)
    3. http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html (AJP)
    4. http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html (load-balancer)

    If you want to use the AJP protocol and you have more complex configuration needs, you can also use mod_jk (not mod_jk2, which is an old, dead, abandoned, completely irrelevant project, now). You can find out more about mod_jk on the Tomcat site here: http://tomcat.apache.org/connectors-doc/

    mod_jk has a radically different configuration procedure and a lot more AJP-specific options than mod_proxy_ajp.

    The (short) documentation you mentioned in your original post (from the old mod_jk2 docs) points to Apache httpd’s mod_proxy_ajp and mod_proxy_balancer modules (though it points to the unstable httpd 2.1, which was the bleeding-edge at the time that documentation was written). You were on the right track: you just needed to keep reading. You can definitely proxy to as many backend instances of Tomcat as you want with any of the modules described here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When acting as a reverse proxy, apache adds x-forwarded headers as described here. http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers
I'm running wamp on Vista (Apache v2.2.11) and have projects setup such that http://localhost/projectx
We have Tomcat application server set up at port 8080 and Apache Http Server
I have a sub domain that I want to redirect to a different location
We have an existing situation where we have Apache 2.0 HTTPD acting as the
I have my Apache http server running on localhost:80 and restlet server on localhost:8182,
I have 51 GB of HTTP (Apache) access logs for my website going back
I have an apache log I am looking to filter on HTTP status codes.
I have just installed CentOS, Apache and PHP. When I visit my site http://example.com/myapp/
I have a website where I want users that sign up to get their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.