Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I am having some trouble getting some basic authentication working in apache2. I have a directory i want to protect with a username and password so have put the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    2

    apache2 authentication errors


    Hi, I am having some trouble getting some basic authentication working in apache2.

    I have a directory i want to protect with a username and password so have put the following into my httpd.conf in the <Directory "/blah/blah/blah"> section

    AuthType Basic
    AuthName "login needed"
    AuthUserFile /var/www/logins/.passwords
    Satisfy All
    Require valid-user
    Options All
    AllowOverride None

    This setup worked fine with apache1.
    I have also tried using a .htaccess file and i have the same problem.

    What is actually happening is this. Without any kind of authentication at all, the site works fine and i get a directory listing. When i have this authentication, i get this error message

    Forbidden

    You don't have permission to access / on this server.
    Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 Server at vhost.domain.tld Port 80

    This site is running as a virtual host.

    I have checked my error logs and this is what they say

    [Sun Sep 21 07:10:40 2008] [error] [client ip.ip.ip.ip] client denied by server configuration: /blah/blah/blah/

    which doesn't really tell me anything i don't already know


    I have spent alot of time trying to figure this one out...

    can someone help ??

    ta
    ken

  2. #2
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    hey,

    stop your iptables and give a try once.
    Regards
    David Anand
    -->Success is the list of failures ...!!!

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    2
    hey, i disabled iptables and it worked. what's better is that i re-enabled iptables and it still works now. thanks for the advice. do you know what is it about iptables and apache2 that causes this error ?

    ken

  4. #4
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    hey,

    there are many reasons.... check the secure logs.any one in your network might have tried to access the server with out proper password..
    you might have framed rules in iptables and might have saved but not restarted the iptables ..
    Regards
    David Anand
    -->Success is the list of failures ...!!!

Posting Permissions

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