On 9/24/2012 8:00 AM, chaudhariprade...@gmail.com wrote:
It goes to o.com
Sent from BlackBerry® on Airtel

-----Original Message-----
From: "Caldarale, Charles R" <chuck.caldar...@unisys.com>
Date: Mon, 24 Sep 2012 09:59:19
To: Tomcat Users List<users@tomcat.apache.org>
Reply-To: "Tomcat Users List" <users@tomcat.apache.org>
Subject: RE: Problem with hosting mulitple websites on single tomcat 7

From: Pradeep [mailto:chaudhariprade...@gmail.com]
Subject: Fwd: Problem with hosting mulitple websites on single tomcat 7

  <Host name="a.com" appBase="webapps_a"></Host>
  <Host name="b.com" appBase="webapps_b"></Host>

they both are pointing to o.com and not to their
respective domains/webapp directories

What does the above statement mean?  Be precise.  What "they" are you referring to?  What 
do you mean by "pointing to"?  What actually happens when you send a request to 
http://a.com or http://b.com?

  - Chuck

Pradeep,

In order for people on the list to help you help yourself to get the configuration working, some information is necessary. More information is almost always better than less information.

First of all, you might want to review the following Wiki article. Although it mentions development, the same environment with very little modification works as a production platform.

http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts

In particular, putting your web applications in CATALINA_BASE/webapps_a, CATALINA_BASE/webapps_b, etc. is probably a bit messy.

Now, some questions.

1. Exact version of Tomcat

You can get this by running ./catalina.sh version on the command line in the CATALINA_BASE/bin directory.

2. Exact version of JRE

The above command will also print this out

3. What is the configuration of your machine?

Are there multiple NIC cards, multiple IP addresses using virtual interfaces, are you using CNAMEs in DNS, or what?

4. How is your firewall rule written to forward port 80 to port 8080?

5. How are your Connector elements configured?

Paste each active Connector (more than one?) into the body of the mail message.

6. Access logs for all hosts would help

Add access logging for each host. Something like the following might be useful.

<Valve className="org.apache.catalina.valves.AccessLogValve"
       directory="logs"
       prefix="a.com-access." suffix=".log"
       pattern="%h %l %u %t &quot;%r&quot; %s %b" />

And one like this for b.com . . . .

7. How are you accessing the other hosts?

This goes back to question 3. For example, if you're testing by going after the IP address, then all you're probably going to get is the default host.

If you're using the same name that is listed in your server.xml, then things SHOULD work (at least on my and countless other systems, this works).

8. When you access each of the hosts, what do the three access logs show?

Access o.com - what's in all three logs
Access a.com - what's in all three logs
Access b.com - what's in all three logs

In short, more information is needed in order for people on the list to be helpful.

. . . ok, so maybe not so short
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to