Luciano Andress Martini wrote:
I need to do this in tomcat6:
Apache2 form:
<Directory /var/www/temporarios/upload_contracheque>
Order allow,deny
deny from all
</Directory>
I think that you are again not very clear, but I will try to guess.
There is no direct equivalent of the above in Tomcat, because Tomcat works on the base of
"context" rather than "disk directory".
(For an Apache2 equivalent, think <Location> instead of <Directory>).
So to re-phrase your question :
You have a directory in Tomcat, like (tomcat_dir)/webapps/mywebapp/X , and you want to
prevent (all) web users from accessing the content of that sub-directory X. Yes ?
If yes, then the best way of achieving this is probably to have this directory be outside
of the Tomcat /webapps/ space (better even, totally outside the Tomcat directory tree).
If you need to access it from Apache2, then you can always use an Alias in
Apache2.
E.g.
/var/www/site1/docs/ = Apache2 DocumentRoot
/var/www/tomcat/webapps/ = Tomcat webapps dir
/var/www/temporarios/upload = directory where the files are uploaded
In Apache2 :
Alias /temporarios/ /var/www/temporarios/
<Directory /var/www/temporarios>
..... (Allow/deny and other things) ...
</Directory>
In Tomcat : nothing (Tomcat will not even see this directory, and no Tomcat URL can reach
it).
If your Tomcat webapp needs to read/write there, then you decide that inside your Tomcat
webapp.(And you give the Apache and the Tomcat user the appropriate user-id & permissions
to read/write there).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org