As while working with apache many of us feel like having a secure way to access our data.
Simple but effective http basic auth is probably the quickest and the easiest answer.
Setting it up requires only two things:
- htpasswd file (containing valid user name and password)
- And apache configuration file to read it.
Creating a htpasswd file:
- htpasswd -cm </Path/tp/htpasswd-file> <username>
- While adding more users just remove c from the above command.
- Add this to default (vhost file) configuration file
Allow from all
AuthName "Restricted Area"
- Now reload apache and enjoy.