I want to protect a folder, so I add .htaccess to this folder with the following content: AuthName "Restricted Area" AuthType Basic AuthUserFile /web/.htpasswd AuthGroupFile /dev/null require valid-user I add the required .htpasswd in the /web folder as well. After entering the correct password, ISPconfig3 shows error 500. This error is gone if I remove .htaccess from the folder. How can I add password protection without generating error 500?
I think the problem is the location of /.htpasswd file. The path after AuthUserFile is the place in the filesystem where the file lives, and you need to know where your web hosting space root really is. In my case I use Debian so the path to a site is like this /var/www/mydomain.tld/web, so the path for AuthUserFile /var/www/mydmain.tld/.htpasswd