Re: Allowing Robots.txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On October 10, 2011 15:04 , Matt <lm7812@xxxxxxxxx> wrote:
Is there a way to do something like this?

<Files / !=/robots.txt !=/downloads/>
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
require valid-user
</Files>

Yes, but not using that syntax.

I basically want to require a password everywhere but on robots.txt
and the downloads folder.  I want to still require encryption and
limit access by subnet on the downloads though just no password.
robots.txt needs to be open to the world.

# Require user authentication for everything:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile/var/www/.htpasswd
AuthGroupFile /dev/null
require valid-user

# Except, do not require user authentication for robots.txt
# Allow robots.txt to be accessed from everywhere:
<Files robots.txt>
    Order allow,deny
    Allow from all
    Satisfy any
</Files>
# note that the above actually allows access to ANY file named
# robots.txt anywhere beneath the document root directory.
# If you really need to restrict everything except /robots.txt
# that's possible, but requires a more sophisticated solution.

# Also, do not require user authentication for the /downloads
# directory, but limit access to it by subnet:
<Directory /downloads>
    Order allow,deny
    Allow from 192.168.0.0/16 172.16.0.0/12
    Satisfy any
</Directory>

--
  Mark Montague
  mark@xxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux