You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alan F <sh...@hotmail.com> on 2022/03/04 09:50:54 UTC

403 whilst reading from ROOT

Im trying to read robots.txt from '/' on a few tomcat servers to block web search engines. Obviously placed the txt file in ./webapps/ROOT/

Works fine on a few tomcat hosts that have identical server.xml / web.xml  so im puzzled as to why these two Tomcat servers are blocking requests, obviously something is different. Ive checked ./Catalina/localhost and see some restrictions here but only apply to /webapps/manager

Im not sure where else to look?



The error im seeing is:

HTTP Status 403 - Forbidden
________________________________
Type Status Report
Description The server understood the request but refuses to authorize it.




Re: 403 whilst reading from ROOT

Posted by Mark Thomas <ma...@apache.org>.
On 04/03/2022 09:50, Alan F wrote:
> Im trying to read robots.txt from '/' on a few tomcat servers to block web search engines. Obviously placed the txt file in ./webapps/ROOT/
> 
> Works fine on a few tomcat hosts that have identical server.xml / web.xml  so im puzzled as to why these two Tomcat servers are blocking requests, obviously something is different. Ive checked ./Catalina/localhost and see some restrictions here but only apply to /webapps/manager
> 
> Im not sure where else to look?

web.xml for security constraints

context.xml (and server.xml) for Valves?

It is also possible the application deployed to ROOT is intercepting the 
request (Filter or default servlet) and returning the 403.

Mark

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