I deleted my previous answer and would like to suggest a solution that I provided below
I did a little search and found a solution to your problem. In the code where you use the directive auth_basic, make the following changes :
satisfy any;
allow 10.0.0.1/8;
deny all;
auth_basic "....";
auth_basic_user_file ...;
? " satisfy , any all . :
;)