Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Fri, 27 Feb 2009 07:19:17 -0800 (PST),    group: uk.net.web.authoring        back       
Configure Apache server to ask for password from unknown ip   
II have an (2.x) Apache server on which I have some information in one
directory I want to protect from prying eyes. (It's not overly
confidential, so the utmost in secrity is not needed)  I know how to

* Password to protect a directory, using the most basic form, which is
fine for this application.
* Restrict accept from specific IP address.

So far I am doing the second of these, but occasionally I wish to
access the data from a wireless hotspot, of unknown IP. Is it possible
to allow access with no password from specific IPs, but to request a
password from any other random IP? This would allow great convenice
(no need for a password) most of the time, but allow access from
anywhere else with the slight inconvenience of adding a password.

If it is possible, an someone show me how I can add the necessary
information to httpd.conf
date: Fri, 27 Feb 2009 07:19:17 -0800 (PST)   author:   Karen Bindash

Re: Configure Apache server to ask for password from unknown ip   
Karen Bindash wrote:

> * Password to protect a directory, using the most basic form, which is
> fine for this application.
> * Restrict accept from specific IP address.

I believe the 'Satisfy' directive is what you're looking for,

http://httpd.apache.org/docs/2.2/mod/core.html#satisfy

-- 
Tony Evans
Saving trees and wasting electrons since 1993
blog -> http://perceptionistruth.com/
olmr -> http://www.onelinemoviereviews.co.uk/
[ anything below this line wasn't written by me ]
date: Fri, 27 Feb 2009 16:41:13 +0000   author:   Tony

Re: Configure Apache server to ask for password from unknown ip   
"Karen Bindash"  schreef in bericht 
news:f3112d02-4ca4-456d-be35-aa99f1a152f3@a12g2000yqm.googlegroups.com...
> II have an (2.x) Apache server on which I have some information in one
> directory I want to protect from prying eyes. (It's not overly
> confidential, so the utmost in secrity is not needed)  I know how to
>
> * Password to protect a directory, using the most basic form, which is
> fine for this application.
> * Restrict accept from specific IP address.
>
> So far I am doing the second of these, but occasionally I wish to
> access the data from a wireless hotspot, of unknown IP. Is it possible
> to allow access with no password from specific IPs, but to request a
> password from any other random IP?

This request is easily satisfied by combining
http://httpd.apache.org/docs/2.2/mod/core.html#require
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow
http://httpd.apache.org/docs/2.2/mod/core.html#satisfy
into
AuthType Basic
AuthName "Restricted Resource"
AuthUserFile /web/users
Require valid-user

Order allow,deny
Allow from 192.168.1

Satisfy Any


HansH
date: Fri, 27 Feb 2009 17:45:37 +0100   author:   HansH lid

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us