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 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
</Directory>
<Location />
    AuthType SSPI
    SSPIAuth On
    SSPIAuthoritative On
    SSPIDomain DOMAINNAME
    SSPIOfferBasic On
    Require group GROUP_NAME
</Location>
share|improve this question

1 Answer 1

up vote 4 down vote accepted

you can use the "satisfy" condition :

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

Order Deny,Allow
Allow from 88.88.88.89
Allow from 88.89.90.91
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

share|improve this answer

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.