.htaccess Proctection

IP address restrictions to protect directories using .htaccess

    copy the below 6 lines to .htaccess file 
    <limit GET>
    order deny,allow
    deny from all
    allow from 128.175
    allow from 128.4
    </limit>
       

Folder proctection using .htaccess this is only for linux users

     Create .htaccess if not present and add below 5 lines
    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /var/www/vhosts/sitename/httpdocs/.htpasswd
    AuthGroupFile /dev/null
    require valid-user

# htpasswd -c /var/www/vhosts/sitename/httpdocs/.htpasswd kirthan

No comments:

Post a Comment

Start and Stop ssh-agent

Below is the bash script used to start and stop ss-agent #!/bin/bash ## in .bash_profile SSHAGENT=`which ssh-agent` SSHAGENTARGS="...