httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] Q:Access control based on ip and/or user
Date Mon, 14 Jun 2004 14:34:13 GMT
Rainer Krienke wrote:
> So if a user accesses the web pages from an address say 192.1698.1.1
> access should be granted without user authentification.  If the user tries
> access the web page from any other host he should have to authenticate
> himself in the usual manner (AuthType Basic, require valid-user).

Fairly simple. In your .htaccess file:

    # Authenticate using basic auth
    AuthType Basic
    AuthName "Super Secret!"
    AuthUserFile /path/to/passwords
    Require valid-user

    # Authorize using mod_access
    Order Deny,Allow
    Deny from all
    Allow from

    # Tell Apache any method will do
    Satisfy any


Robert Andersson

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message