.htaccess Use

to use .htaccess
at around line 341 change  
AllowOverride None    to ==>

AllowOverride AuthConfig

saveit

cd outside webdir eg /etc/httpd/conf/ 

#htpasswd -c .htpasswd rambo
password : ******
..................................................................
to add more users like rambo do
#htpasswd .htpasswd  samsung
password:********
.................................................................

Create a file .htaccess in the dir which you want to control web/dir access for example /var/www/html/www.internal.ninja.com/ and add following lines

AuthType Basic
AuthName " Restricted Area Please insert userame password "   ##this will appear in msg box
AuthUserFile /etc/httpd/conf.d/.htpasswd
require valid-user
.............................................
next
#service httpd reload
#httpd -S   (if made on VH)

inheritance and performance issues if used in large scale..

No comments:

Post a Comment