I want to configure Apache to allow connections from A specific IP or otherwise based on usernames. Is this possible? For now I am having this configuration which is username based.

<Directory />

    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
<Location />
    AuthType SSPI
    SSPIAuth On
    SSPIAuthoritative On
    SSPIOfferBasic On
    Require group GROUP_NAME

1 Answer 1


you can use the "satisfy" condition :

AuthUserFile /path/to/.htpasswd
AuthType Basic
AuthName "Restricted Area"
Require valid-user

Order Deny,Allow
Allow from
Allow from
Deny from all

Satisfy any

that means if the user does not have the ip 'Allow from', he will be asked to enter a password

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .