.htaccess allow access to one file, deny the rest.

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

 



Fedora Core 4/apache2.0.59

Is it possible to use an htaccess file to deny access to everything in a directory EXCEPT one particular file and allow access to that file via IP address?  I have a script that needs to be able to hit http://someurl/nagios/cgi-bin/tac.cgi.  I am using the following .htaccess file to restrict access to our nagios page to a passwd file but allow access to the tac.cgi file.  I can't seem to find an example anywhere for what I am doing.

<Directory /usr/local/nagios/sbin/>
   Options ExecCGI
   SSLRequireSSL
   order deny,allow
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/passwd
   AuthName "nagios"
   require valid-user
<Files tac.cgi>
   Order Allow,Deny
   Allow from "SOME IP"
</Files>
</Directory>

Unfortunately, I am getting a 403 error with this config in place.


--Doug




[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