On 25/05/2010 14:13, Jeff wrote: > The application does not automatically redirect to 443. > > Standard HTTP exhibits the same behavior: if the default host is > firstdomain.com, http://seconddomain.com still accesses the ROOT app for > firstdomain.com
There's no chance you uploaded the apps to the wrong domain is there? p > On 5/25/2010 7:48 AM, Pid wrote: >> On 25/05/2010 13:00, Jeff wrote: >> >>> I did not have Alias elements inside the Host elements. I did try both >>> w/ and w/o www. so I didn't consider that an issue. After adding Alias >>> elements, the problem persisted. >>> >>> There are ROOT.xml Contexts in both >>> $CATALINA_HOME/conf/Catalina/firstdomain.com and >>> $CATALINA_HOME/conf/Catalina/seconddomain.com >>> >>> Both are simple: >>> >>> <Context path="" docBase="ROOT" debug="0" /> >>> >> The debug attribute hasn't been used for a while, remove it. >> The two other attributes are also useless, remove them. >> >> If the above is your entire Context definition you can omit the file >> entirely. >> >> Can you disable the HTTPS connectors entirely, temporarily, or does the >> application automatically redirect to a secure channel for all requests? >> >> >> p >> >> >> >>> On 5/25/2010 5:06 AM, Pid wrote: >>> >>>> On 25/05/2010 10:44, Jeff wrote: >>>> >>>> >>>>> I have two IP-based virtual hosts configured in a standalone Tomcat >>>>> server. Each host has its own SSL certificate and keystore. Tomcat >>>>> appears to behave as if only the default host is defined. When I hit >>>>> seconddomain.com, Tomcat serves the ROOT app for firstdomain.com and >>>>> writes to firstdomain.com access log. When I try >>>>> https://seconddomain.com, the domain is untrusted, which I suspect is >>>>> because Tomcat is using the cert for firstdomain. >>>>> >>>>> If I change the defaultHost value to seconddomain.com, the behavior >>>>> flips and Tomcat serves the ROOT app for seconddomain.com when I try >>>>> http://firstdomain.com. >>>>> >>>>> >>>> Are you requesting firstdomain.com or www.firstdomain.com? >>>> You have no Alias elements set inside the Host element. >>>> >>>> Also, are there any Context definitions? Either in >>>> META-INF/context.xml >>>> or e.g. tomcat/conf/Catalina/firstdomain.com/ >>>> >>>> >>>> p >>>> >>>> >>>> >>>> >>>>> AFAIK, the server.xml configuration below should work. Any clues as to >>>>> what is wrong? >>>>> >>>>> TIA >>>>> >>>>> * Tomcat 6.0.26 (stand alone) >>>>> * Red Hat Enterprise 5 (Linux 2.6.18-164.15.1.el5 on x86_64) >>>>> * IP-based virtual hosting >>>>> * Tomcat running as daemon via JSVC >>>>> * server.xml: >>>>> >>>>> 1.<Engine name="Catalina" defaultHost="firstdomain.com"> >>>>> 2. >>>>> 3.<Connector port="80" protocol="HTTP/1.1" >>>>> 4. connectionTimeout="20000" >>>>> 5. redirectPort="443" >>>>> 6. useIPVHosts="true" /> >>>>> 7. >>>>> 8.<Connector address="1.2.3.4" port="443" >>>>> 9. protocol="org.apache.coyote.http11.Http11Protocol" >>>>> 10. SSLEnabled="true" >>>>> 11. maxThreads="150" scheme="https" secure="true" >>>>> 12. clientAuth="false" sslProtocol="TLS" >>>>> 13. keystoreFile="/usr/share/tomcat/.keystore" >>>>> 14. keystorePass="changeit" /> >>>>> 15. >>>>> 16.<Connector address="5.6.7.8" port="443" >>>>> 17. protocol="org.apache.coyote.http11.Http11Protocol" >>>>> 18. SSLEnabled="true" >>>>> 19. maxThreads="150" scheme="https" secure="true" >>>>> 20. clientAuth="false" sslProtocol="TLS" >>>>> 21. keystoreFile="/usr/share/tomcat/.keystore2" >>>>> 22. keystorePass="changeit" /> >>>>> 23. >>>>> 24.<Host name="firstdomain.com" >>>>> 25. appBase="/home/websites/firstdomain.com/webapps" >>>>> 26. unpackWARs="true" >>>>> 27. autoDeploy="true"> >>>>> 28.<Valve className="org.apache.catalina.valves.AccessLogValve" >>>>> 29. directory="/home/websites/firstdomain.com/logs" >>>>> 30. prefix="firstdomain.com_access." >>>>> 31. suffix=".log" >>>>> 32. pattern="common" >>>>> 33. resolveHosts="false"/> >>>>> 34.</Host> >>>>> 35. >>>>> 36.<Host name="seconddomain.com" >>>>> 37. appBase="/home/websites/seconddomain.com/webapps" >>>>> 38. unpackWARs="true" >>>>> 39. autoDeploy="true"> >>>>> 40.<Valve className="org.apache.catalina.valves.AccessLogValve" >>>>> 41. directory="/home/websites/seconddomain.com/logs" >>>>> 42. prefix="seconddomain.com_access." >>>>> 43. suffix=".log" >>>>> 44. pattern="common" >>>>> 45. resolveHosts="false" /> >>>>> 46.</Host> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>>> >>>>> >>>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
signature.asc
Description: OpenPGP digital signature