I am running magento on an nginx server. I decided to lock down a folder full of .php files using auth_basic and a htpasswd file. Without the auth, the php pages render and work fine. But after forcing the auth, when I go to the page I get the login prompt (which is good), I log in, and then the browser tries to download the php file. It refuses to render it. This is across multiple browsers (chrome, firefox, opera, ie). Any idea what I need to do to be able to have it password protected but still working? Thanks!
EDIT: .conf file auth setup
location ~^ /FOLDER/ {
auth_basic "Restricted";
auth_basic_user_file /path/to/htpasswd/;
}