title: Apache basic authentication except for those Allowed
body: <p>Problem: I have some files under /var/www/files/ that I want them to be accessed from specific IP addresses WITHOUT requiring user/password. However, I would like that any other IP address SHOULD require login to gain access. </p>
  
  <p>This is in my httpd.conf:</p>
  
  <pre><code>&lt;Directory /var/www/files/&gt;
          Order deny,allow
          Deny from all
          Allow from 192.168 
          AuthUserFile /etc/apache2/basic.pwd 
          AuthName "Please enter username and password" 
          AuthType Basic 
          Require user valid-user 
  &lt;/Directory&gt;
  </code></pre>
  
  <p>But, if I understood correctly, this means that any client coming from 192.168.* will have access to that directory BUT will require a valid-user to view its content. And any other IP address will be denied. right?</p>
  
  <p>Thank you in advance.</p>