Results 1 to 2 of 2

Thread: apache 1.3: realms and .htaccess

  1. #1
    Senior Member
    Join Date
    Apr 2002

    apache 1.3: realms and .htaccess


    Im trying to set up an authenticated page. For practice suppose I wanted to give access to the default page but secure a subdirectory of the default home directory.

    homedir (anonymous access)
    ---> subdir ( plaintext authentication)

    I edit the httpd.conf file and add this

    <Directory "/my/web/home/subdir">
    AuthType Basic
    AuthUserFile /my/password/file
    AuthName "Secret Place"
    Require user jughead

    restart apache

    Now I go to the url of the web server and I get asked for a password(im not accessing the subdir)! And when i hit cancel at this page 3 times it lets me see the page anyway??!
    Why? I actually want the opposite to happen. Authentication is needed to
    get to a directory and any subdirectories. (This is my main question, does this actually happen if I protect a directory) What exactly is a realm as defined by AuthName? apache docs don't go into detail.


  2. #2
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001

    Re:apache 1.3: realms and .htaccess

    It has been a long time since I've done this ( or I've actively administer a web site since I've got very busy with my own business ) so I will just comment on the setting of yours.

    [quote author=Blaqb0x link=board=4;threadid=5627;start=0#54101 date=1037667575]
    <Directory "/my/web/home/subdir">
    The quotes are not needed. And in fact, it may be what cause it to ignore it. The correct way is
    <Directory /complete/directory/of/file>
    And make sure you've got the complete path of the directory ( or at least to what after Apache's document root directory ).

Similar Threads

  1. .htaccess-any help on this?
    By fareen in forum Linux - General Topics
    Replies: 0
    Last Post: 01-20-2006, 08:16 PM
  2. .htaccess
    By luca in forum Linux - General Topics
    Replies: 2
    Last Post: 01-01-2005, 04:49 PM
  3. .htaccess security
    By pinehead in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 06-02-2004, 03:57 PM
  4. htaccess and cookies
    By coltrane in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 12-27-2002, 06:29 AM
  5. .htaccess
    By gmoreno in forum Linux - Hardware, Networking & Security
    Replies: 9
    Last Post: 05-07-2002, 02:35 PM


Posting Permissions

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