* venerdì 31 luglio 2009, alle 17:52, Fabio Muzzi scrive:
> Le prove che ho fatto mi dicono che l'autenticazione funziona di fatto
> in AND e non in OR. Quindi posso impedire in toto l'accesso da fuori, e
> richiedere la password da dentro. Ma non riesco a consentire l'accesso
> da dentro e richiedere la password da fuori.
>
> Nella fattispecie, questa config qui ottiene che da dentro si accede con
> la password e da fuori si becca un 403 secco:
>
>
> <Location /phpmyadmin>
> order allow,deny
> # deny from all
> allow from 127.0.0.0/255.0.0.0 ::1/128
> allow from 192.168.0.0/255.255.0.0
> AuthType Basic
> AuthName Phpmyadmin
> AuthUserFile /etc/apache2/passwd.phpmyadmin
> require valid-user
> AllowOverride All
> </Location>
>
>
> Le altre combinazioni (order deny, allow) per esempio ottengono come
> risultato di richiedere la password sia da fuori che da dentro.
Allora, quello che ti serve è la direttiva Satisfy
http://httpd.apache.org/docs/2.0/mod/core.html#satisfy
C'è anche l'esempio, cmq:
For example, if you wanted to let people on your network have
unrestricted access to a portion of your website, but require that
people outside of your network provide a password, you could use a
configuration similar to the following:
Require valid-user
Allow from 192.168.1
Satisfy Any
--
Maurizio - Tannoiser - Lemmo
Founder Member of ERLUG http://erlug.linux.it
-------------------------------------------------------------------------------
"Forty-two! Is that all you've got to show for seven and a half million
year's work?" - Loonquawl.
|