Results 1 to 2 of 2

Thread: Why doesn't .htaccess and .htpasswd work?

  1. #1

    Default Why doesn't .htaccess and .htpasswd work?

    My .htaccess looks like this and is in /srv/www/htdocs/

    **************************************
    AuthName Restricted Area
    AuthType Basic
    AuthUserFile /srv/www/htdocs/.htpasswd
    AuthGroupFile /dev/null

    require user username
    **************************************
    .htpasswd is in the same directory and looks like this-> Username Here:Encrypted Password Here

    I used an online encryption tool to encrypt the password.

    the permissions are:
    linux-rawq:/srv/www/htdocs # ls -li .htaccess
    247968 -rw-r--r-- 1 root root .htaccess
    linux-rawq:/srv/www/htdocs # ls -li .htpasswd
    247504 -rw-r--r-- 1 root root .htpasswd

    the httpd.conf file says:

    <Directory />
    Options None
    AllowOverride All
    Order deny,allow
    Deny from all
    </Directory>

    The site is on localhost, Suse 11.2 running Apache 2.

    I have restarted Apache

    The site shows me nothing, no prompt or error signals or anything. What am I missing?

  2. #2
    Join Date
    Apr 2010
    Location
    Warsaw, Poland
    Posts
    198

    Question Re: Why doesn't .htaccess and .htpasswd work?

    Why do you put .htaccess in htdocs? .htaccess is for ~/public_html rather

Posting Permissions

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