You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Paul Szkudlapski <jo...@bsfc.ac.uk> on 2002/05/13 11:50:49 UTC

Access Restrictions

Hi all

I have 4 public available web servers, I am just adding a fifth, but I want
to limit access to it, people will need to get access to it from both inside
and outside the college, it has a LAN and WAN card: -

Is it possible I can do one of the following : -

If you are comming from the .bsfc.ac.uk domain, you are allowed straight
throught, but if you are not from our domain, you are asked for a password ?

Thanks

------------------------------------
John Paul Szkudlapski (Web Manager)
Computer Services - BSFC
t: +44 151 651 3720
f: +44 151 653 4419
m: +44 780 154 2033
w: http://hermes.bsfc.ac.uk


****************************************************************
Birkenhead Sixth Form College

This message is sent in confidence for the addressee only;
If it has come to you in error please notify compserv@bsfc.ac.uk

The contents of this e-mail are the personal views of the sender,
which may not necessarily reflect those of the college.

This message has been scanned for viruses.
The college cannot accept any responsibility for any viruses
which may have come from external sources.

****************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Access Restrictions

Posted by Robert Andersson <ro...@profundis.nu>.
On Monday, 13 May 2002, John Paul Szkudlapski wrote:


> Hi all
>
> I have 4 public available web servers, I am just adding a fifth, but I
want
> to limit access to it, people will need to get access to it from both
inside
> and outside the college, it has a LAN and WAN card: -
>
> Is it possible I can do one of the following : -
>
> If you are comming from the .bsfc.ac.uk domain, you are allowed straight
> throught, but if you are not from our domain, you are asked for a password
?
>
> Thanks
>

Couldn't see any other replies to this, so I give it a shot.

Do you mean that only computers within your domain are to be allowed in
without password, or people browsing from such domain. Although not clear, I
bet you mean the former. You should be able to do this by setting Apache to
do a reverse DNS loopup so it knows the computer name/domain, then use that
info in an Allow directive.

I'm no expert, but read:
http://httpd.apache.org/docs-2.0/mod/mod_access.html#allow

To ask for password for others, you may need to do a more complicated
configuration. As stated, I'm no expert, so my suggestion, or rather, guess,
is probably not the best one. Set up two vitrual hosts with the (almost)
exact same configuration; one as the real domain (the one people should surf
to) and the other as another domain name (although legal). The first should
have an allow directive, to only let people from your domain in, the other
should have a normal password restriction. You then apply a rewrite rule (of
which I know nothing about, but think should do the trick), which will
redirect/rewrite the URL to the second domain if itsn't from your domain.

Check out:
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


Regards,

Robert Andersson





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org