apache security

Oct 9, 06:14 AM

step one – create the .htaccess file:


AuthUserFile /var/www/public_html/blah/blah/.htpasswd
AuthGroupFile /dev/null
AuthName “My Private Directory”
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

notice the AuthUserFile location – it can be anywhere you want!

step two: create the .htpasswd file and add one line:

(be sure the location matches the specified location above in AuthUserFile (run phpinfo() to determine file location)

test:yj.MaEHK5×6iY

easy way to create an .htpasswd entry:
http://www.htaccesstools.com/htpasswd-generator/

important possible way to call the page: (2009-12-07)
http://USERNAME:password@www.ThisDomain.com/mySecretArea/

Mark Edwards

,

---

Commenting is closed for this article.

---