Forum Moderators: phranque

Message Too Old, No Replies

htaccess -ipranges - max os x 10.3 server

         

beleth

8:29 am on Aug 13, 2004 (gmt 0)



Here is what I want to do:

-Access for the internal networks to an intranet page without entering a password

-Any visitor from a ip not inside one of the local networks should be forced to enter a password

my htaccess file

-------
AuthUserFile /var/www/localhost/htdocs/test/.htpasswd
AuthGroupFile /dev/null
AuthName "Intranet"
AuthType Basic

#<limit GET POST>
satisfy any
require valid-user
order deny,allow
deny from all
allow from 192.168.2.0/24
#allow from 192.168.4.0/24
#allow from 192.168.5.0/24
#</limit>
----------

this file seems to work on my notebook (running gentoo linux / apache2) .......but not on the os x server ....the entry "allow from 192.168.2.0/24" gives every ip access to the pages

Maybe you could help me to recognize my mistakes :) thx

gergoe

12:34 pm on Aug 14, 2004 (gmt 0)

10+ Year Member



Check that all the required modules (mod_access, mod_auth) are loaded in the server config (and they are in the correct order, mod_access before mod_auth), and ensure that the htaccess files are enabled for the mentioned directory. Additional problem might be that the username and the password are cached on the client; therefore it can access the directory. If this box is on a corporate network behind a proxy/firewall/router then requests coming from outside of the network will happen on the apache as request coming from your internal network - with the ip address of your router. In this case exclude the router from the Allow directive.