Find the answer to your Linux question:
Results 1 to 3 of 3
Dear forum, I'm trying to protect one of the folder on my webserver and after googling few alternatives I've decided to use the .htaccess file and this is what I've ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Posts
    7

    .htaccess


    Dear forum,

    I'm trying to protect one of the folder on my webserver and after googling few alternatives I've decided to use the .htaccess file and this is what I've done:

    edited "/etc/httpd/conf/httpd.conf" as follow:

    <Directory "/var/www/html">
    Options Indexes Includes FollowSymLinks
    AllowOverride all
    Allow from from all
    Order allow,deny
    </Directory>
    <Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Allow from from all
    Order allow,deny
    </Directory>
    <Directory "/var/www/cgi-bin">
    Options ExecCGI
    AllowOverride None
    Allow from from all
    Order allow,deny
    </Directory>


    the .htaccess file contains:

    AuthName "Enter Password"
    AuthType Basic
    AuthUserFile /var/www/html/Mydirectory/.htpasswd
    require valid-user

    then I've created the "/var/www/html/Mydirectory/.htpasswd" file with the command "htaccess -c .htpasswd username"
    then I've successfully entered the password.


    Result:

    I get promped for username and password when I open the protected pages with Netscape or IE but... for some reason is not authenticating, it keeps asking for username and password.

    does any one have any clue on what is causing the authentication to fail???

    Any help is appreciated!!!

    Thanks in advance.

  2. #2
    Just Joined!
    Join Date
    Dec 2004
    Location
    In a shop
    Posts
    8
    It also didn't work out with me for Basic Authentication so i used digest authentication instead, it isn't that much harder even though is sounds like it. Ask if you want to know how.

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Posts
    7
    After few attempts I found out that you have to grant read access for ugo to the .htpasswd file and I've also noticed that they must have x access rights to the folder where the .htaccess is stored.

    But I'm interested to setup digest authentication and if it is not so hard may be absolutely worth give it a try!!!!

    Thanks,

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •