how do I create a password on directories and files?

Discussion in 'Apache' started by asif2k, Aug 27, 2006.

  1. #1
    I created a test directory in my /var/www/html/ and the .htaccess and .htpasswd authentication works fine. But I need to do the same authentication into my user's public_html directory. For example, let's say I create a Test directory into my /home/user/public_html/test and then I place the .htaccess file so that it will be password protected. I cannot do it in public_html. I am able to run the authentication in /var/www/html. How can I configure the .htaccess and .htpasswd authenticantion in my public_html directory. So, that when I open up IE I will type www.site.com/~user/test/ and then I should be prompted for a login.
     
    asif2k, Aug 27, 2006 IP
  2. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #2
    If you are on cpanel hosting you can configure secure logins for directories in the backend.
     
    dcristo, Aug 27, 2006 IP
  3. asif2k

    asif2k Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no, I am not running cpanel. I am not sure what I have to change in the httpd.conf file.
     
    asif2k, Aug 27, 2006 IP