Web Development Thread, Password protected folder in Apache2 in Coding and Web Development; I'm trying to setup a basic password protected folder (for file sharing) on our apache2 web server
I've created a ...
16th November 2011, 05:18 PM #1
Password protected folder in Apache2
I'm trying to setup a basic password protected folder (for file sharing) on our apache2 web server
I've created a password file with htpasswd and then I've edited the \etc\apache2\sites-enabled\000-default file and added the Directory entry:
AuthName "Please login"
Require user username
I've created the \var\www\foldertoshare and given the apache user www-data access to it.
This sort of works - when I enter the url of the folder I am prompted for the credentials. However when I enter them I always get:
Where am I going wrong with this? I'm sure I did this before on a previous server!
You don't have permission to access /foldertoshare/ on this server.
IDG Tech News
16th November 2011, 08:01 PM #2
16th November 2011, 08:59 PM #3
Yes I've got the password file.
From further testing it seems to be that directory browsing isn't allowed. If I add a file to the 'protected' folder and type the full URL to the file, it request the user/password and then opens the file.
I would like people to browse the folder once they have entered the credentials - is that possible?
16th November 2011, 09:19 PM #4
You would have to allow directory listing in the Apache config if you are wanting to do what I think you are.
17th November 2011, 10:56 AM #5
I thought the Options -Multiviews in the Directory listing would allow that?
I only want to allow directory browsing on this particular folder.
By bertster in forum Windows Server 2000/2003
Last Post: 7th December 2010, 05:22 PM
By Trapper in forum Windows
Last Post: 25th June 2010, 11:06 AM
By pbaddhan in forum Windows Server 2000/2003
Last Post: 19th May 2010, 12:39 PM
By brahma in forum Windows
Last Post: 31st March 2009, 03:00 PM
By russdev in forum Windows
Last Post: 3rd October 2005, 09:31 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)