protect a directory - sub domain

Discussion in 'Apache' started by samaa, Oct 4, 2009.

  1. #1
    hi guys ,
    I need your help...
    I want to use .htaccess file to protect a directory to allow specific IP.
    actually, I already did that every thing is ok but not perfect!
    the directory is protected as the path
    but it's not work well as a subdomain !


    It's Ok when I entered :
    http//:www.exampledomain.com/vb/admin

    but it's not Work if I entered as subdomain:
    http//:vb.exampledomain.com/admin


    I use this .htaccess file
    
    AuthGroupFile /dev/null
    AuthName "Admin Area"
    AuthType Basic
    AuthUserFile /home/****/domains/exampledomain.com/.htpasswd/public_html/vb/admin/.htpasswd
    require valid-user
    
    Options +FollowSymLinks
    RewriteEngine On
    
    Order deny,allow
    Deny from all
    
    # allow my Ip
    Allow from ***the Ip***
    PHP:
    I search that I can use :
    AuthType Digest
    and use :
    AuthDigestDomain/ http://www.exampledomain.com/vb/admin/
    http://vb.domain.com/admin/

    How can I use this ?
    and where can I find the .htpasswd file that created after using Password Protection ?


    Regards & waiting for your reply ;)
     
    samaa, Oct 4, 2009 IP
  2. samaa

    samaa Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    any reply?!
     
    samaa, Oct 7, 2009 IP