| Sean Preston on Wed, 3 Jan 2001 16:01:50 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: GLUG: Apache Authentication |
Hi
> I have a webserver, running apache, on this webserver is our intranet site,
> this server is at present accessible from both our LAN, and from the www, now
> what I want to do is make this more secure, by allowing all people on our LAN
> access to this intranet site, while prompting all people from outside our
> intranet for a username and passwd. Does anyone know how I can accomplish this,
> as so far, all that I've manged to do is have it prompting for a passwd from
> both sides, which is not what I want.
According to the Apache FAQ the answer is:
3.How do I set up Apache to allow access to certain documents only if a
site is either a local site or the user supplies a password and
username?
Use the Satisfy directive, in particular the Satisfy Any directive,
to require that only one of the access restrictions be met. For example,
adding the
following configuration to a .htaccess or server configuration file
would restrict access to people who either are accessing the site from a
host under
domain.com or who can supply a valid username and password:
Deny from all
Allow from .domain.com
AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswd.users
AuthName "special directory"
Require valid-user
Satisfy any
See the user authentication question and the mod_access module for
details on how the above directives work.
This can be found at:
http://httpd.apache.org/docs-2.0/misc/FAQ.html#remote-auth-only
Hope this helps
Cheers
Sean
~~~
Sean Preston sean@xxxxxxxxxxxx
Linux, the OS of choice