unhide directory with .htaccess file
I am using Apache with Kerberos security enabled. The http page simply lists the directories contained in /var/www/html. I want to make only one of the directories in the document root secured so that when someone clicks on it, it requires him/her to enter credentials. Right now when I place the .htaccess file in the directory I want to protect, the directory is hidden from the list and the user has to enter the whole path to get authenticated and access the files.
I've tried Options +Indexes which was posted all over the net, but it didn't work. Any help would be highly appreciated. Aman |
Hi,
You need to add: Code:
IndexOptions ShowForbidden Regards |
[QUOTE=bathory;4386955]Hi,
You need to add: Code:
IndexOptions ShowForbidden Thanks bathory, worked perfectly!! Do you have any idea how to apply directory restrictions based on AD groups rather than users? Right now it works for users, here is my .htaccess file: Code:
AuthName "Windows Account Login" |
Hi,
You can use mod_authnz_ldap to authenticate users through a Windows AD. I'm not familiar with windows stuff to help you further, but if you do a little search, you'll find a lot of documentation about this. Regards |
I am using the Windows version of Apache 2.0.63. There are certain directories I'd like to be password protected, so I added an .htaccess file to these directories with the following information,
AuthName "Select Viewers" AuthType Basic AuthUserFile "C:/Program Files/Apache Group/Apache2/pass/.htpasswd" Require valid-user ,however once I do this, the directory becomes hidden. The only way to access it via the internet is to already know the directory name. I would like to unhide this directory, but maintain password protected access. In the Windows version of Apache, I do not see a folder named /var/www/html. I tried adding IndexOptions ShowForbidden to the .htaccess file, but browser access still did not display the password-protected directories. I tried adding IndexOptions ShowForbidden to the httpd.conf file under this section, <Directory "E:/"> Order allow,deny Allow from all Options +Indexes IndexOptions FancyIndexing NameWidth=64 AllowOverride authconfig </Directory> however, after saving the httpd.conf file, the Apache service will not start and yields error, "The requested operation has failed!" I suspect that the IndexOptions ShowForbidden may apply to newer versions of Apache, perhaps version 2.2. What is the analogous equivalent to this command for Apache 2.0.63 when run in Windows? Is there any other way to unhide password protected directories with Apache 2.0.63 in Windows? Thank you. |
@feipoa
Quote:
Since apache-2.0.x is no longer maintained, it's better to upgrade PS: And please don't hijack others threads, you should start your own Regards |
My appologies. I did not feel I was "hijacking" this thread - my question is consistent with the OP. There exists some variability in what users refer to as "hijacking", so I appologise if my interpretation and consequent action upsets you.
Unfortunately, Apache 2.0.63 was the latest version of Apache I was able to get functioning with Windows NT 4.0 on my 486. It may be there are other methods to display password-protected directories in Apache 2.0.x. |
All times are GMT -5. The time now is 08:56 AM. |