Well this is an interesting question, looks like a piece of homework. Well you will want to look at using Digest http authentication for your user authentication. Here is the Apache doc for that:
http://httpd.apache.org/docs/2.0/mod...th_digest.html. Google searching the term will give you some good third party guides as well.
In order to exclude your local host connections look at using the "Satisfy" directive. You can also look at the access control directives for Apache here:
http://httpd.apache.org/docs/2.2/howto/access.html.
Do some reading on that, a little searching and if you get stuck on anything specific respond here and we will help get you in the right direction.