title: Htaccess password authentication Ubuntu 14.04 LTS
body: <p>When I upgraded my VPS from Ubuntu 13.10 to 14.04 password protected directories are now giving the error below even if the correct password is entered.</p>
  
  <pre><code>Unauthorized: This server could not verify that you are authorized 
  to access the document requested. Either you supplied the wrong 
  credentials (e.g., bad password), or your browser doesn't understand 
  how to supply the credentials required.
  </code></pre>
  
  <p>Apache error.log says "No requires line available"</p>
  
  <p>Files are as follows:-</p>
  
  <p><strong>/etc/apache2/sites-available/example.com.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName example.com
  DocumentRoot /var/www/mysite
  &lt;/VirtualHost&gt;
  
  &lt;Directory /var/www/mysite&gt;
  Options -Indexes
  AllowOverride AuthConfig
  Order allow,deny
  Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p><strong>/var/www/mysite/.htaccess</strong></p>
  
  <pre><code>AuthType Basic
  AuthName "Protected"
  AuthUserFile /var/www/mysite/.htpasswd
  require valid-user
  </code></pre>
  
  <p><strong>/var/www/mysite/.htpasswd</strong></p>
  
  <pre><code>admin:gIlFunhlCwBeY
  </code></pre>
  
  <p>Please will you help me to get authentication working again.</p>