You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by gu...@bbo.com on 2001/02/03 23:50:14 UTC

Success at last - Tomcat+Apache+mod_ssl

I finally got tomcat to serve up the proper web pages with mod_ssl in the
picture.  For those who may not remember, here is what I was attempting to
accomplish:  Tomcat and Apache sharing the same document root:
/apache/htdocs/pub for http, and /apache/htdocs/secure for https.  The
problem seemed to boil down to the fact that the "" context could only be
established once for an IP address, irrespective of which ports the requests
came in on.  So while HTML pages were correctly served up from the
appropriate directory from Apache, tomcat would only let me establish one ""
context and thus only one docBase, with the result that when I asked for a
secure page like https://www/myserver.com/jsptest.jsp
<https://www/myserver.com/jsptest.jsp> , tomcat would give me the page out
of the pub directory, not out of the secure one.
 
My solution to this problem was to use two copies of Tomcat, once with a
docBase of /apache/htdocs/pub using ajp12, and the other with a docBase of
/apache/htdocs/secure using the ajp13 connector.  Because I have two
instances of tomcat running, I had to modify one of them to put ajp12 on a
non-default port; I moved it from 8007 to 8008.  I also couldn't include the
default workers.properties file, but had to handcraft one.
 
But it is finally working.  Craig, you might want to consider allowing
tomcat to be started with specified server.xml and workers.properties files.
As it is, I had to install tomcat twice.
 
Guy Rouillier
571-226-1229
guyr@bbo.com <ma...@bbo.com> 
Domino Networks
2950 Gallows Road
Falls Church, VA 22042