Alister West

home is where your code is ...

Apache BasicAuth and IP restriction matching.

Use the apache config option "Satisfy Any":http://httpd.apache.org/docs/2.2/mod/core.html#satisfy to mix both IP allow and user basic_auth.

# Apache Directory block for restricting access
#   (but not Location blocks)
# http://httpd.apache.org/docs/current/mod/core.html#satisfy
#
<Directory /var/home/>
    Satisfy Any

    Order deny,allow
    Deny  from all
    Allow from 72.249.182.136
    # alisterwest.com: 72.249.182.136

    AuthType       Basic
    AuthName       IsProtected
    AuthUserFile   /var/home/.htpasswd
    AuthGroupFile  /dev/null
    require        valid-user
</Directory>
By Alister West