Thursday, May 5, 2016

How to secure apache access or website folder access

Use below tricks:
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/secure/apasswords
Require user vivek

# chown www-data:www-data /home/secure/apasswords
# chmod 0660 /home/secure/apasswords
 vi .htaccess
Add following text:
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/secure/apasswords
Require user vivek

No comments:

Post a Comment