The best way to use PAM authentication in Apache looks to be external authentication with help of pwauth tool. Unfortunately this tool has quite tricky installation procedure. Here is a great article with detailed information about compiling, testing and installing pwauth under Ubuntu.