You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carl Mace <mc...@ist4.co.umist.ac.uk> on 2001/03/26 15:51:47 UTC

Protecting xml files using htaccess

I'm trying to protect my xml files using htaccess, but I can't get it to 
work inside my cocoon dir.

I can get it to work on all other dir's, but when it comes to protecting 
anyting inside it, its like the server doesn't read it.  I have to use 
htaccess because i haven't got access to the http.conf dir to use the 
<directory> directive.

My code looks like this (this works outside cocoon)

AuthUserFile  /myFile/.htpasswd
AuthName "Please Enter Password"
AuthType Basic
<Files myFile.xml>
<Limit GET POST>
require valid-user>
</Limit>
</Files>

Can anyone help me on how to protect my xml files.

Rgrds

C



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Protecting xml files using htaccess

Posted by Sebastien Koechlin <sk...@ivision.fr>.
Carl Mace wrote:
> 
> I'm trying to protect my xml files using htaccess, but I can't get it to
> work inside my cocoon dir.
(...)
> <Files myFile.xml>
> <Limit GET POST>
> require valid-user>
> </Limit>
> </Files>

This is not a Cocoon problem, but URI/File confusion.
You can not use Files or Directory directive, because apache
is not serving files, it is answering to URI request, and
sending cocoon requests to your serlvet engine.

Use the Location directive instead.


-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Protecting xml files using htaccess

Posted by Ulrich Mayring <ul...@denic.de>.
Carl Mace wrote:
> 
> Can anyone help me on how to protect my xml files.

If you are not set on using htaccess, then you can take a look at the
auth taglib (http://ulim.cocoonhost.com). It protects XML files any way
you want and works with every combination of webserver/servletserver
that runs cocoon itself.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>