Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I don't understand why this isn't working for me. Here's my conf portion:

<Directory />
   AuthType Basic
   AuthName "Please Log In for Access"
   AuthUserFile /etc/apache2/.htpasswd
   Order Deny,Allow
   Deny from all
   Allow from 111.111.111.111 111.111.111.112
   Satisfy any
   <LimitExcept POST>
     Require valid-user
   </LimitExcept>
</Directory>

However, the "Satisfy any" let's anyone through. If I change it to Satisfy all, the authentication shows for the Allowed IP and Non allowed IP's.

Help?

share|improve this question
    
IT would help if you described what behavior you desire. –  covener Jan 22 '11 at 2:39
    
This seems to work, but still not sure why ... <LimitExcept POST> AuthUserFile /etc/apache2/.htpasswd AuthName "Please Log In for Access" AuthType Basic Order deny,allow Deny from all Satisfy Any Require valid-user Allow from 111.111.111.1 Allow from 127.0.0.1 </LimitExcept> –  TylerNZ Jan 24 '11 at 10:20
add comment

1 Answer 1

It looks okay to me, although a couple things to check

  • LimitExcept only works from apache 2.0.51 upwards, make sure you have a compatible version.
  • Make sure that the apache user can read the .htpasswd file properly

Also you can try to remove the LimitExcept for the moment and see if that helps, piecing out the config and trying it in small bunches is always a good trick.

share|improve this answer
    
Hi lynxman, - apache is version 2.2.17 –  TylerNZ Jan 24 '11 at 0:02
    
So looks like my recommendation worked, good! –  lynxman Jan 24 '11 at 8:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.