Using Apache to authenticate

Discussion in 'Server Operation' started by ikaros, Sep 23, 2006.

  1. ikaros

    ikaros New Member

    I want to protect a folder with Apache, so when a user tries to access that folder, a username & password should be asked for. I use the following code in httpd.conf, but it doesn't work.

    Code:
    # Set up an authenticated directory, in this case foo
    <Directory "/srv/www/foo">
    	AuthType Basic
    	AuthName "Efarmogi"
    	AuthUserFile /srv/www/www.foo.gr/user/foo_user/allow.users
    	require foo_user
    </Directory>
    Any ideas?
     
  2. sjau

    sjau Local Meanie Moderator

    Try this:

    Code:
    # Set up an authenticated directory, in this case foo
    <Directory "/srv/www/foo">
    
    	AuthType Basic
    	AuthName "Efarmogi"
    	AuthUserFile /srv/www/www.foo.gr/user/foo_user/allow.users
    	require valid-user
    </Directory>
     
  3. ikaros

    ikaros New Member

Share This Page