-1

I am using Apache 2.2.22 on Ubuntu 12.04.

I need to disable access to directory /var/www/abc/ but allow access to file inside this directory /var/www/abc/README.txt. I try:

<Directory /var/www/abc/*>
    Order allow,deny
    deny from all
    <Files /var/www/abc/README.txt>
        order allow,deny
        allow from all
    </Files>
</Directory>

But it doens't work - acess to directory is disabled (ok) and file is to disabled (not ok).

What I do bad?

martin
  • 218
  • 1
  • 3
  • 11

1 Answers1

1

Files tag must use relative path to Directory. With absolute path (<Files /var/www/abc/README.txt>) it doesn't work.

This works:

<Directory /var/www/abc/*>
    Order allow,deny
    deny from all
    <Files README.txt>
        order allow,deny
        allow from all
    </Files>
</Directory>
martin
  • 218
  • 1
  • 3
  • 11