Have you created a .htpasswd file? Authentication, Authorization and Access Control - Apache HTTP Server
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!HTML Code:Forbidden You don't have permission to access /foldertoshare/ on this server.
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?
You would have to allow directory listing in the Apache config if you are wanting to do what I think you are.
I thought the Options -Multiviews in the Directory listing would allow that?
I only want to allow directory browsing on this particular folder.
There are currently 1 users browsing this thread. (0 members and 1 guests)