Maybe this URL will help you configure Apache for use with CGI.
It sounds like you need to install the CGI module to interpret your scripts.
I'm not familiar with Apache on OS X so perhaps that tutorial will not help.
If you need further help, I can configure Apache in Linux and see what the problem is exactly.
Let me know.