Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude some IPs from authorization

Tags:

apache

apache2

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?

like image 336
Tomasz Wysocki Avatar asked Jan 07 '11 14:01

Tomasz Wysocki


People also ask

What IP address is?

Here's how to find the IP address on the Android phone:Go to your phone's settings. Select “About device.” Tap on “Status.” Here you can find information about your device, including the IP address.


1 Answers

<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>
like image 120
Tomasz Wysocki Avatar answered Oct 16 '22 08:10

Tomasz Wysocki