httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] Deny access to all but 2 paths
Date Mon, 27 Feb 2012 02:07:29 GMT
On Mon, Feb 27, 2012 at 12:38 PM, Grant <emailgrant@gmail.com> wrote:

> >> Can anyone tell me how to deny access to all paths/files/locations
> >> within a VirtualHost except for these:
> >>
> >> /folder/file.html
> >> /folder/file.txt
> >>
> >> - Grant
> >
> > Maybe something like this?
> >
> > <Directory /folder">
> >      Order deny,allow
> >      Deny from all
> >      <FilesMatch "file\.(txt|html)$">
> >           Allow from all
> >      </FileMatch>
> > </Directory>
>
> Thank you.  Your solution gave me an idea.
>
> I have some settings inside a <Location /> block that I need applied
> to all but those same files:
>
> /folder/file.html
> /folder/file.txt
>
> Can that be done or do I need to use a separate VirtualHost for those
> files?
>
> - Grant
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Depends where your Location stanza is. Post your specific configuration if
you need specific answer.

Mime
View raw message