Solved

Tomcat Using Apache Proxy

Posted on 2006-11-20
1
450 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
1 Comment
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 500 total points
ID: 18060957
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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