A couple of options come to mind right away.
First, in your httpd.conf, create a <Directory ...></Directory> block. Within that you can use "allow none" and "allow from ..." to control access to the directory.
<Directory /var/www/html/secure>
allow none
allow from domain.com
</Directory>
ScriptAlias /var/www/html/secure
That might work

. MIGHT. Not sure, haven't tried that out.
Another option is to use a .htaccess file to control visitors access to the scripts. Do some hunting on the web for how they work. They're pretty easy to use.
My last suggestion, and most complicated, is to build a login page in Perl and use a MySQL database backend to store the valid users and passwords. I have several things I've written that use this approach, but I used PHP.