Using Drupal's database for Apache authentication I have static content outside of Drupal that I need to password protect using the users's existing credentials in Drupal. I found an apache module that lets you use MySQL for Apache authentication:

http://sourceforge.net/projects/modauthmysql/

Unfortunately, this doesn't support sha-2 (sha512) that Drupal 7 uses.

Does anyone know of any alternative ways to do this? I'd like to avoid wrapping all this content in PHP because it's generated (and regularly updated) by a tool, has any number of relative links and folders and such, and the only way I can think of handling that with PHP outside of modifying the files is to use mod_rewrite to route all the requests for html files through some sort of front controller that is a Drupal module (or a bootstrapped Drupal).
I did in the past use the export_user_db module, but it is similarly lacking in D7 support.

I am now using modauthmysql quite successfully with D6; I also have an auxiliary module that I can publish to do single-sign-on between Drupal and Apache-authenticated sections of the website.

You are correct that the lack of a Drupal-7-compatible password hash is a limitation, but I don't think this would be too hard to add. Contact me on d.o if you would like to collaborate.

http://drupal.org/user/438598

If you really only need to serve static content, serving it from Drupal per the other answer is easier and better.