Hello to all the SysAdmin and IT Workers in this post. Thanks for your responses. Many of the replies to my questions were acceptable but this one was best suited for our production environment.
Ok. To block a directory or a file within a virtual host in server.xml you just have to add the following code to the server.xml in the tomcat/conf directory.
Before:
<Host name="www.customer.com" appBase="/usr/share/app4_0b/tomcat/webapps/" autoDeploy="false">
<Context path="" docBase="./customer" />
<Valapp className="org.apache.catalina.valapps.FastCommonAccessLogValapp"
directory="weblogs/customer"
prefix="www_customer_com_"
suffix=".txt"
pattern="combined"
resolappHosts="false" />
</Host>
After:
<Host name="www.customer.com" appBase="/usr/share/app4_0b/tomcat/webapps/" autoDeploy="false">
<Context path="" docBase="./customer" />
<Context path="/app/xv/~customer/etc" docBase="" >
<Valapp className="org.apache.catalina.valapps.RemoteAddrValapp" deny="*" />
</Context>
<Context path="/etc" docBase="" >
<Valapp className="org.apache.catalina.valapps.RemoteAddrValapp" deny="*" />
</Context>
<Valapp className="org.apache.catalina.valapps.FastCommonAccessLogValapp"
directory="weblogs/customer"
prefix="www_customer_com_"
suffix=".txt"
pattern="combined"
resolappHosts="false" />
</Host>
So the answer to the question is add the following lines:
<Context path="/app/xv/~customer/etc" docBase="" >
<Valapp className="org.apache.catalina.valapps.RemoteAddrValapp" deny="*" />
</Context>
<Context path="/etc" docBase="" >
<Valapp className="org.apache.catalina.valapps.RemoteAddrValapp" deny="*" />
</Context>