Tomasz Wysocki
Tomasz Wysocki

Reputation: 11578

How to exclude some IPs from authorization

I have following rule:

<Location />
    AuthType Basic
    AuthName test-server
    Require valid-user
    AuthUserFile /etc/apache2/passwd
</Location>

But want to exclude some IP addresses from authorisation process, so if you are connecting from such address, you don't have to submit login/password. How to do that?

Upvotes: 6

Views: 6067

Answers (1)

Tomasz Wysocki
Tomasz Wysocki

Reputation: 11578

<Location />
    AuthType Basic
    AuthName test-server
    Require valid-user
    AuthUserFile /etc/apache2/passwd
    Deny from all
    Allow from 123.123.123.123
    Satisfy any
</Location>

Upvotes: 13

Related Questions