Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache .htaccess password protect with relative path

I want to create a .htaccess file in my DocumentRoot, so that the directory is password protected.

But the password file, I want to specify by using the relative path of DocumentRoot.

So, if I am checking out the code in another system, it just works as it is. The password file will be part of my source control.

How can I access the parent directory of the DocumentRoot from .htaccess file?

like image 560
Sabya Avatar asked May 13 '09 13:05

Sabya


1 Answers

I don’t think that’s possible. The AuthUserFile directive requires the file-path to be either absolute (thus from file system root) or relative from the server root.

like image 50
Gumbo Avatar answered Sep 28 '22 20:09

Gumbo