|
Home > Archive > Web Servers on Unix and Linux > May 2004 > .htaccess on linux allowing ip address
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
.htaccess on linux allowing ip address
|
|
|
| I'm trying to allow certain ip address's to connect to my website
without requiring a username/password and for everyone else that
doesn't match the ip to have to enter a user/password to gain access
to my website. I've tried using the Limit below but its not working.
Does anyone know how I would get this working?
Thanks,
..htaccess file
-------------------
AuthUserFile /home/cc1/de/.htpasswd
AuthName Member
AuthType Basic
<Limit GET>
order deny,allow
deny from all
allow from .loop.net
require valid-user
</Limit>
| |
| David Efflandt 2004-05-13, 7:37 pm |
| On 13 May 2004 15:50:35 -0700, Chris <chris_12003@yahoo.com> wrote:
> I'm trying to allow certain ip address's to connect to my website
> without requiring a username/password and for everyone else that
> doesn't match the ip to have to enter a user/password to gain access
> to my website. I've tried using the Limit below but its not working.
>
> Does anyone know how I would get this working?
>
> Thanks,
>
>
> .htaccess file
> -------------------
> AuthUserFile /home/cc1/de/.htpasswd
> AuthName Member
> AuthType Basic
>
><Limit GET>
> order deny,allow
>
> deny from all
>
> allow from .loop.net
> require valid-user
></Limit>
That would only allow *.loop.net hosts to connect AND require auth, but
only for GET method. Any other method is unrestricted (POST, etc.)
Lose the Limit wrappers and see apache docs for Satisfy.
--
David Efflandt - All spam ignored http://www.de-srv.com/
| |
|
| I got it working but is there anyway for me to specify a user name to
log in my websites logfiles. Right now it displays
205-212-12-112.cc1.net - - [13/May/2004:22:26:08 -0700] "GET
/db/db122.cgi HTTP/1.1" 200...
And would like it to say 205-212-12-112.cc1.net - subscriber -
[13/May/...
That way it would be easy for me to see that they were accessing a
subscriber area.
order deny,allow
deny from all
#chris
allow from 205.212.12.112
AuthType Basic
AuthUserFile /home/cc1/de/.htpasswd
AuthName "CC1 Database Access (Subscribers Only)"
require valid-user
Satisfy any
Thanks,
Chris
|
|
|
|
|