Apache – Password protect a Directory

cd /this/dir/is/secure

### create .htpasswd
htpasswd -c .htpasswd user1

### add a new user
htpasswd .htpasswd user2

### .htaccess
AuthUserFile .htpasswd
AuthName "Ric's protected files"
AuthType Basic

source

Comments are closed.