My Science Is Better

7Oct/110

Password protect a folder in Apache using .htaccess

mkdir -p /home/secure/
htpasswd -c /home/secure/apasswords developer
chown apache:apache /home/secure/apasswords
chmod 0660 /home/secure/apasswords

then in your htaccess add these:

AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/secure/apasswords
Require user developer
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

Tag Cloud

Categories

Archives

Akismet

Blogroll

Ads