>> Date: Tue, 25 Feb 2003 13:09:09 +0800
>> From: William Claxton <[EMAIL PROTECTED]>
>> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED]
>> Subject: need 2 appbase settings
>>
>> We have successfully moved our appbase to a folder other than Tomcat's
>> default. However, this means we can no longer see the manual pages or the
>> Tomcat servlet examples.
>>
>> I believe the correct approach would be to create 2 host entries in
>> 'server.xml', one with the default appbase (where we'd find the Tomcat
>> manual and examples), and one for the modified appbase (where we'd find our
>> own applications). There may also need to be modifications to the Apache
>> configuration, to enable virtual hosting.
>>
>
At 09:41 PM 2/24/03 -0800, you wrote:
>
>That technique would work.
>
>So would putting an explicit <Context> element inside the standard <Host>
>element, with a docBase attribute pointing back to where the files really
>are (remember, both docBase and appBase can be absolute or relative
>paths).
>
>An even simpler approach, of course, would be to just copy or move the
>"tomcat-docs" into your new "appBase" location -- then, the automatic
>recognition will find them again.
>
>> Has anyone done this? If so, can you provide snippets from your
>> 'server.xml' and perhaps 'httpd.conf' to show us how it's done?
>>
>>
>
>Craig
>
An update on this issue...
We're trying to use Craig's solution - create a context that points to the
absolute address of the Tomcat examples. This will save making the DNS
changes required for a virtual host.
For presenting the tomcat documentation, adding a server alias in Apache
does the trick. But we're still having trouble making the servlet examples
work. Here's a snippet of the 'server.xml'.
{...}
<Host name="localhost" debug="0" appBase="/home/web" unpackWARs="true">
{...}
<Context path="/examples"
docBase="/usr/local/jakarta/jakarta-tomcat-4.1.18/webapps/examples" debug="0"
reloadable="true">
</Context>
{...}
</Host>
{...}
When we access an example servlet using port 8080, it works fine:
http://www.openasia.net:8080/examples/servlet/HelloWorldExample
When we access the same servlet using port 80 (via Apache), it fails with a
404 error:
http://www.openasia.net:80/examples/servlet/HelloWorldExample
This, despite the fact that the 'mod_jk' connector is properly configured,
and works fine for other contexts.
As expected, the Apache access log reports:
"GET /examples/servlet/HelloWorldExample HTTP/1.1" 404 1068
Apache error_log reports:
File does not exist: /home/web/sites/openasia/site/htdocs/examples
Incidentally, the path '/home/web/sites/openasia/site/htdocs' is our site
document root. Finally, mod_jk.log reports:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
The file 'web.xml' in '/examples/WEB-INF' is straight from the default
installation, unchanged. It includes a filter for the pattern '/servlet/*'.
Any ideas?
Regards, Bill Claxton [EMAIL PROTECTED]
OpenAsia Solutions provides streaming media & payment solutions.
Check out http://www.openasia.net
........:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]