?
Solved

Tomcat Using Apache Proxy

Posted on 2006-11-20
1
Medium Priority
?
471 Views
Last Modified: 2011-09-20
Hello All,

I have setup a tomcat server with an apache proxy to send different domains to different tomcat apps.

vhosts
----------------------------------------------------------------------------------------------
<VirtualHost *:80>
ProxyRequests on
ProxyPreserveHost on
ServerName              *.domain1.com
ProxyPass               / http://192.168.21.35:8081/domian1/
ProxyPassReverse        / http://192.168.21.35:8081/domain1/
</Virtualhost>

<VirtualHost *:80>
ProxyRequests on
ProxyPreserveHost on
ServerName              *.domain2.com
ProxyPass               / http://192.168.21.35:8081/domian2/
ProxyPassReverse        / http://192.168.21.35:8081/domain2/
</Virtualhost>


server xml (part)
----------------------------------------------------------------------------------------------
<Service
      name="Catalina">
    <Connector
        port="8080"
        redirectPort="8443"
        minSpareThreads="25"
        connectionTimeout="20000"
        maxThreads="150"
        maxSpareThreads="75">
    </Connector>
    <Connector
        port="8009"
        redirectPort="8443"
        protocol="AJP/1.3">
    </Connector>
    <Connector
        enableLookups="true"
        port="8081"
        proxyPort="80"
        redirectPort="-1"
        acceptCount="10">
    </Connector>
    <Engine
        defaultHost="localhost"
        name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
      <Host
          appBase="webapps"
          name="localhost">
      </Host>
    </Engine>
  </Service>


The problem is that every request to a page creates a new session in tomcat. The sessionID is not being saved in the request from the browser.

How do I get around this?

Thanks,

Matt
0
Comment
Question by:essentialtalk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 1500 total points
ID: 18060957
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

801 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