You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Johannes Lietz <jo...@antwerpes.de> on 2003/05/28 17:28:57 UTC

Apache/Tomcat Configuration Problem

This is a minor problem, but I have no idea yet:

In httpd.conf I configured VirtualHosts with a DocumentRoot like this:

<VirtualHost *>
     ...
     DocumentRoot /usr/local/bin/tomcat/webapps
     ...
     <Location "/*.jsp">
         JkUriSet worker ajp13:localhost:8009
     </Location>
     <Location ~ /*/servlet/*>
         JkUriSet worker ajp13:localhost:8009
     </Location>
     ...
</VirtualHost>

This makes Apache serve all static content, and it works for all 
webapps but the ROOT webapp because Apache will not look for static 
content in /usr/local/bin/tomcat/webapps/ROOT.

Who knows how to do this properly?

Thanks,
Johannes



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache/Tomcat Configuration Problem

Posted by John Turner <to...@johnturner.com>.
DocumentRoot /usr/local/bin/tomcat/webapps/ROOT

If "/" = ROOT, there shouldn't be any content in 
/usr/local/bin/tomcat/webapps at all, static or not.

John

On Wed, 28 May 2003 19:41:27 +0200, Johannes Lietz 
<jo...@antwerpes.de> wrote:

> Sorry, I was mistaken:
>
> I've got several webapps under tomcat/webapps and one virtualhost.
> Let's say I've got app1 and app1/image.gif.
>
> If I call:
> 	http://localhost/app1/image.gif
> Apache will look for:
> 	/usr/local/bin/tomcat/webapps/app1/image.gif
>
> and everything is perfect.
> Then I've got the root-app and ROOT/image.gif.
>
> If I call:
> 	http://localhost/image.gif
> Apache will look for:
> 	/usr/local/bin/tomcat/webapps/image.gif
>
> and give a 404 because my gif actually is in 
> /usr/local/bin/tomcat/webapps/ROOT/image.gif
>
> Therefore I need something to redirect requests for the root app to 
> /usr/local/bin/tomcat/webapps/ROOT.
>
> - Johannes
>
>
>
> On Mittwoch, Mai 28, 2003, at 07:20  Uhr, John Turner wrote:
>
>>
>> You're saying that if you make your DocumentRoot "webapps/ROOT" that 
>> Apache doesn't serve content in that directory?  What error message does 
>> Apache display?
>>
>> The ROOT webapp is "special" as far as Tomcat is concerned.
>>
>> John
>>
>> On Wed, 28 May 2003 17:28:57 +0200, Johannes Lietz 
>> <jo...@antwerpes.de> wrote:
>>
>>> This is a minor problem, but I have no idea yet:
>>>
>>> In httpd.conf I configured VirtualHosts with a DocumentRoot like this:
>>>
>>> <VirtualHost *>
>>> ...
>>> DocumentRoot /usr/local/bin/tomcat/webapps
>>> ...
>>> <Location "/*.jsp">
>>> JkUriSet worker ajp13:localhost:8009
>>> </Location>
>>> <Location ~ /*/servlet/*>
>>> JkUriSet worker ajp13:localhost:8009
>>> </Location>
>>> ...
>>> </VirtualHost>
>>>
>>> This makes Apache serve all static content, and it works for all 
>>> webapps but the ROOT webapp because Apache will not look for static 
>>> content in /usr/local/bin/tomcat/webapps/ROOT.
>>>
>>> Who knows how to do this properly?
>>>
>>> Thanks,
>>> Johannes
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>> -- Using M2, Opera's revolutionary e-mail client: 
>> http://www.opera.com/m2/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache/Tomcat Configuration Problem

Posted by Johannes Lietz <jo...@antwerpes.de>.
Sorry, I was mistaken:

I've got several webapps under tomcat/webapps and one virtualhost.
Let's say I've got app1 and app1/image.gif.

If I call:
	http://localhost/app1/image.gif
Apache will look for:
	/usr/local/bin/tomcat/webapps/app1/image.gif

and everything is perfect.
Then I've got the root-app and ROOT/image.gif.

If I call:
	http://localhost/image.gif
Apache will look for:
	/usr/local/bin/tomcat/webapps/image.gif

and give a 404 because my gif actually is in 
/usr/local/bin/tomcat/webapps/ROOT/image.gif

Therefore I need something to redirect requests for the root app to 
/usr/local/bin/tomcat/webapps/ROOT.

- Johannes



On Mittwoch, Mai 28, 2003, at 07:20  Uhr, John Turner wrote:

>
> You're saying that if you make your DocumentRoot "webapps/ROOT" that 
> Apache doesn't serve content in that directory?  What error message 
> does Apache display?
>
> The ROOT webapp is "special" as far as Tomcat is concerned.
>
> John
>
> On Wed, 28 May 2003 17:28:57 +0200, Johannes Lietz 
> <jo...@antwerpes.de> wrote:
>
>> This is a minor problem, but I have no idea yet:
>>
>> In httpd.conf I configured VirtualHosts with a DocumentRoot like this:
>>
>> <VirtualHost *>
>> ...
>> DocumentRoot /usr/local/bin/tomcat/webapps
>> ...
>> <Location "/*.jsp">
>> JkUriSet worker ajp13:localhost:8009
>> </Location>
>> <Location ~ /*/servlet/*>
>> JkUriSet worker ajp13:localhost:8009
>> </Location>
>> ...
>> </VirtualHost>
>>
>> This makes Apache serve all static content, and it works for all 
>> webapps but the ROOT webapp because Apache will not look for static 
>> content in /usr/local/bin/tomcat/webapps/ROOT.
>>
>> Who knows how to do this properly?
>>
>> Thanks,
>> Johannes
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
> -- 
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache/Tomcat Configuration Problem

Posted by John Turner <to...@johnturner.com>.
You're saying that if you make your DocumentRoot "webapps/ROOT" that Apache 
doesn't serve content in that directory?  What error message does Apache 
display?

The ROOT webapp is "special" as far as Tomcat is concerned.

John

On Wed, 28 May 2003 17:28:57 +0200, Johannes Lietz 
<jo...@antwerpes.de> wrote:

> This is a minor problem, but I have no idea yet:
>
> In httpd.conf I configured VirtualHosts with a DocumentRoot like this:
>
> <VirtualHost *>
> ...
> DocumentRoot /usr/local/bin/tomcat/webapps
> ...
> <Location "/*.jsp">
> JkUriSet worker ajp13:localhost:8009
> </Location>
> <Location ~ /*/servlet/*>
> JkUriSet worker ajp13:localhost:8009
> </Location>
> ...
> </VirtualHost>
>
> This makes Apache serve all static content, and it works for all webapps 
> but the ROOT webapp because Apache will not look for static content in 
> /usr/local/bin/tomcat/webapps/ROOT.
>
> Who knows how to do this properly?
>
> Thanks,
> Johannes
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org