I run an Apache server on my home system that I've made available over the internet as I'm not always at my home system.
Naturally I don't want all my home server files public, so until now I've simply had:
Order allow, deny Deny from all Allow from 127.0.0.1
in my core configuration and just
Allow from all in the htaccess of any directories I wanted publicly viewable.
However I've decided a better system would be to centralise all the access control and just require authentication (HTTP basic) for requests not to 127.0.0.1/localhost.
Is this achievable with Apache/modules? If so how would I go about it?