#1 16.10.06 13:22
[apache] Аутентификация
Проблема заключается в следующем - возможно ли настроить апач так, что бы для указанного пространства IP адресов он не использовал аутентификацию, а для остальных - нет.
Пытался сделать нечто вроде
Код::
<VirtualHost *>
ServerAdmin root@*******.ru
DocumentRoot /home/web_sites/somesite
ServerName www2*******.ru
<directory /home/web_sites/somesite>
AllowOverride None
Order allow,deny
Allow from 217.71.130.134
Allow from 217.71.130.135
Allow from 217.71.130.133
AuthType Basic
AuthName "Proxy Authorization System"
require valid-user
AuthUserFile /home/web_sites/somesite/.htpasswd
</directory>
</VirtualHost>Но аутентификация для указанных адресов требуестя всё равно... :)
Исправлено efferson (16.10.06 13:23)
Offline
#5 17.10.06 14:08
Re: [apache] Аутентификация
efferson написал(а):
A-Lex, ну, дык, я хочу сделать, что бы с указанных ip адресов apache пускал сразу, а для остальных применял аутентификацию...
Это не сделать стандартными средствами апач. Пользователи и адреса вещи разные. Разделяй скриптами, используй сессии.
Offline
#7 25.10.06 18:58
Re: [apache] Аутентификация
Нашёл, если кому интересно:
Satisfy
The Satisfy directive can be used to specify that several criteria may be considered when trying to decide if a particular user will be granted admission. Satisfy can take as an argument one of two options - all or any. By default, it is assumed that the value is all. This means that if several criteria are specified, then all of them must be met in order for someone to get in. However, if set to any, then several criteria may be specified, but if the user satisfies any of these, then they will be granted entrance.
A very good example of this is using access control to assure that, although a resource is password protected from outside your network, all hosts inside the network will be given free access to the resource. This would be accomplished by using the Satisfy directive, as shown below.
<Directory /usr/local/apache/htdocs/sekrit>
AuthType Basic
AuthName intranet
AuthUserFile /www/passwd/users
AuthGroupFile /www/passwd/groups
Require group customers
Order allow,deny
Allow from internal.com
Satisfy any
</Directory>
In this scenario, users will be let in if they either have a password, or if they are in the internal network.
Исправлено efferson (25.10.06 18:59)
Offline

