Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-18 Thread Assaf Urieli
Hi all, I solved this issue following a parallel discussion on another forum: http://forum.linode.com/viewtopic.php?f=19t=8991 Basically, I had IPTables firewall rules rerouting port 443 traffic to port 8443, and port 80 traffic to port 8080. This is because the tomcat6 user cannot access ports

Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-15 Thread Assaf Urieli
Hi Chris, On 6/8/12 11:12 AM, Assaf Urieli wrote: Ok, this is strange. I created a test.jsp page that prints request.getLocalName(), request.getServerName(), and request.getLocalAddr(). I tried various scenarios in the browser: http://domain1.com, http://www.domain1.com, http:/1.2.3.4

Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-14 Thread Assaf Urieli
Thanks Mark Konstantin for your replies. I'm still having no luck here. I've tried to apply all of Mark's suggestions to Ubuntu. SAN certificates are not currently an option for me (because of pricing, and also because the two domains do not officially belong to the same legal entity). My

Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-14 Thread Assaf Urieli
Answering my own question to a certain extent: * When an HTTP/HTTPS request is made, when and how do request.getLocalName() and request.getLocalAddr() get filled in? From v6.0.35 source code, org/apache/catalina/connector/CoyoteAdapter.java, line 489: if (connector.getUseIPVHosts())

IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-08 Thread Assaf Urieli
Hi all, I'm attempting to set up a multi-host system with a separate SSL certificate per host. According to the documentation, this is problematic using name-based virtual hosting: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html#General_Tips_on_Running_SSL Finally, using name-based virtual

Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-08 Thread Assaf Urieli
Hello, Looking at the code, the value used for host name in IP-based virtual hosts is ServletRequest.getLocalName(). It is not getLocalAddr() and there is no pattern in AccessLogValve that prints it. You can write simple JSP page that will display its value. Ok, this is strange. I created