1 |
On 11/28/12 16:34, Grant wrote: |
2 |
> I use apache2 authentication for web users and I would like to require |
3 |
> logins from certain users to be from a certain IP address. I |
4 |
> experimented with Allow and Require but couldn't find a way to restrict |
5 |
> only certain users. Can this be done via apache2 authentication or |
6 |
> should I use another method? |
7 |
> |
8 |
> - Grant |
9 |
|
10 |
very simple via .htaccess |
11 |
|
12 |
<Limit GET POST> |
13 |
order deny,allow |
14 |
deny from all |
15 |
allow from IP_address |
16 |
</Limit> |
17 |
|
18 |
AuthName "restricted stuff" |
19 |
AuthType Basic |
20 |
AuthUserFile /etc/apache2/users |
21 |
require user webmaster |
22 |
|
23 |
-- |
24 |
Joseph |