tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <>
Subject Virtual Hosting Revisited - Apache serving static pages..???
Date Thu, 15 Apr 2004 01:52:50 GMT
Posted this previously and still need some pointers...

Maybe this is not possible, but it seems to be "suggested" in a lot of 
the documentation I have read. Unfortunately those docs "assume" 
something that I am not privy to..  (a brain.. yeah well...<G>) and do 
not outline specific configurations for this setup. I read a lot of "and 
you can have Apache serve the static pages"..etc.. but I have yet to 
find and example of how this would be configured. 

   I would prefer setting this up via the server.xml and the web.xml 
files and have those autoconfigure to the /auto/mod_jk.conf file, but 
for now I need some specifics on how to tell Apache to serve the static 
pages. (I have no problems with serving the jsp and servlets..)


=============== Original post ==================

  Can't seem to get the dots connect between an Apache defined Virtual 
host and one defined in server.xml.

The desired effect is that I want static html pages loaded from Apache 
and jsp/servlet loaded by Tomcat from the same "virtual host" 
definition.  Read a lot of instructions/books..etc  and have in the past 
had no problems with using the default "localhost" (out of the box) 
setup.... now I need this more complex arrangement and I'm missing a 
piece.. can't figure out what it is...  Following are the pieces I 
thought were necessary...

On Apache (2.0.48) I have name based virtual hosting..

Example (snipped version)

       ...other stuff.....

On Tomcat (4.1.29) (abreviated) the Server.xml I have

<Host name=""

    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
     ... other stuff....

This generates the correct mod_jk.conf which is included in the 
httpd.conf file at the end..

  I see my web application defined there and all looks "correct" with 
the entry...




  I have a JkMount as follows (example)

  JkMount /MyWebAp/servletname ajp13
  JkMount /MyWebAp/*.jsp ajp13

(started and restarted everything several times..)

Unfortunately the following Url does not work


... I get an Apache "Not Found"..etc...  Obviously I've missed a dot so 
it is not connecting..  Basically I suspect that the Virtualhost def in 
httpd.conf is conflicting with the one supplied in mod_jk.conf..  But so 
far I have not been able to resolve this..

(Notes.. assume the example domain "" points to is registered with a DNS service. I have no problems 
seeing static pages at that domain in the htdocs/dev1 directory)

 Clues and suggestions..


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message