title: Protect a file with .htaccess and .htpasswd
body: <p>I'm having some troubles configuring the .htaccess file to protect the access of a file.
  The file to protect is:
  www.mydomain.com/admin/stats.php</p>
  
  <p>I put the .htaccess file into the www.mydomain.com/admin folder with the following code:</p>
  
  <pre><code>AuthName "Restricted Area" 
  AuthType Basic 
  AuthUserFile /
  &lt;Files stats.php&gt;
  require valid-user
  &lt;/Files&gt;
  </code></pre>
  
  <p>The file .htpasswd is into the www.mydomain.com/admin folder too and it contains the username and the password.</p>
  
  <p>If I try to access to www.mydomain.com/admin/stats.php I get an "Internal Server Error". I think that the mistake can be into the path of "AuthUserFile" but how can I tell the file that the file to protect is in the same folder of the .htpasswd?</p>
  
  <p>The server is Linux based.</p>