tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <>
Subject Re: Virtual Hosting Revisited - Apache serving static pages..???
Date Thu, 15 Apr 2004 02:19:52 GMT
Thanks for responding.. And yes, I keep hearing that one can do this....

   ... But...<G>  I'm slow I guess, because that still does not give me 
a hint as to "HOW" that is to be configured.. Do you have some virtual 
host directives that do this that I can use as examples..

    Maybe my problem is that I  am thinking I could have the static 
pages located under Apache/htdocs and the jsp pages under 
Tomcat/webapps..   I can't find and example that combines the standard 
Apache virtual host directives with what is needed to also direct the 
jsp to Tomcat..  I can easily to each separately, but have yet to find a 
way to do "both"


Paul Gregoire wrote:

> I do it by mapping all my servlet as .jspx and regular jsp files as 
> .jsp. Apache serves everything else.
> John B. Moore wrote:
>> 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..)
>>  Thanks...
>> =============== 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)
>>    <VirtualHost>
>>       ServerName
>>       ...other stuff.....
>>    </VirtualHost>
>> On Tomcat (4.1.29) (abreviated) the Server.xml I have
>> <Host name=""
>>    appBase="webapps/dev1"
>>    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>>         ...etc....
>>     />
>>     ... other stuff....
>> </Host>
>> 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...
>> <VirtualHost>
>>  ServerName
>>  ...etc...
>> </VirtualHost>
>>  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
>> nor
>> ... 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..
>>  John..
>> ------------------------------------------------------------------------
>> Incoming mail is certified Virus Free.
>> Checked by AVG Anti-Virus (
>> Version: 7.0.230 / Virus Database: 262.8.1 - Release Date: 4/13/2004

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message