Jump to content

Recommended Posts

Posted

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:

 

AuthUserFile /home/username/apassword

AuthName "Please login"

AuthType Basic

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:

 

Forbidden

You don't have permission to access /foldertoshare/ on this server.

 

Where am I going wrong with this? I'm sure I did this before on a previous server!

Posted

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?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...