htaccess

Discussion in 'Server Operation' started by unkn0wn, Sep 13, 2006.

  1. unkn0wn

    unkn0wn New Member

    Hi i have ftp account on some hosting and i want to
    set password for my folder.
    How can i do that. I used before some directives in apache.conf
    but htaccess didnt work. How can i set pass on folder via htaccess
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You mean a password for ftp, or for http?
     
  3. unkn0wn

    unkn0wn New Member

    For http. I want to protect one folder.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Put something like this into your .htaccess file:

    Code:
    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /path/to/.htpasswd
    <limit GET PUT POST>
    require valid-user
    </limit>
    Then create .htpasswd with the htpasswd tool. See
    Code:
    man htpasswd
     

Share This Page