You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Thompson <mi...@thompsonmike.co.uk> on 2004/01/06 13:32:59 UTC

[users@httpd] Newbie (ish) question about access

Hi Users,



  Is there any way to determine where a user is connecting from? What
  I want to do is open my box to the world, but if a user is not
  connecting from a local IP (192.168.1.*) to ask for a username/password.

  Any ideas on how to do this?


-- 

Best regards,
 Michael (mike@thompsonmike.co.uk)
   
Cannot open file " Murray: And look at the flames coming from the back of Berger's McLaren 
 James: Actually, Murray, they're not flames, it's the safety light."

http://www.thompsonmike.co.uk/
PGP KeyID := 0xA9547E32

'To see a world in a grain of sand
And heaven in a wild flower
To hold infinity in the palm of your hand
And eternity in an hour'

Using TheBat! Version 2.02.3 CE
Running On Windows XP (2600, Service Pack 1)
Sent From OneAndOne

Re: [users@httpd] Newbie (ish) question about access

Posted by Patrick Boutilier <bo...@ednet.ns.ca>.
You can use a .htaccess like the following:


AuthType Basic
AuthName Password
AuthUserFile /usr/local/apache/htdocs/.passwd
satisfy any
deny from all
allow from 192.168.1.0/24
require valid-user



Michael Thompson wrote:
> Hi Users,
> 
> 
> 
>   Is there any way to determine where a user is connecting from? What
>   I want to do is open my box to the world, but if a user is not
>   connecting from a local IP (192.168.1.*) to ask for a username/password.
> 
>   Any ideas on how to do this?
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org