title: Reading .htacces on centos
body: <p>I am hoping someone can help. I am quite stuck.</p>
  
  <p>I am struggling to get apache to read my .htaccess file for a one or two sites which are set up in exactly the same way as sites that are working perfectly.</p>
  
  <p>I have a centos server running apache. </p>
  
  <p>In my httpd.conf file I have around 15 virtual hosts declared. About 10 work perfectly and about 5 seem not to read the .htaccess file at all.</p>
  
  <p><strong>Here is what I have tried:</strong></p>
  
  <p><strong>AllowOverride All</strong></p>
  
  <p>All the vhost declrations look like this below with AllowOverride All set.</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin myemail@example.com
      DocumentRoot /var/www/websites/mywebsite/wwwroot
      ServerName mywebsite.com
      ErrorLog logs/mywebsite.com-error_log
      CustomLog logs/mywebsite.com-access_log common
      &lt;Directory "/var/www/websites/mywebsite/wwwroot”&gt;
          Options FollowSymLinks
          AllowOverride All
  
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>Permisions</strong></p>
  
  <p>I have checked for the owner / permisions on the .htaccess file and relevant folders. This is consistent accross those that work and those that do not.</p>
  
  <p>permisions for all sites, those that work and those that do not are like:</p>
  
  <p>-rwxr-xr-x 1 nobody nobody 139 Oct 24 19:26 .htaccess</p>
  
  <p><strong>Is the .htaccess being read?</strong></p>
  
  <p>I the sites that work if I put gibberish in the file like </p>
  
  <p>XXX CAUSE AN ERROR XXX </p>
  
  <p>It gives the expected error in the working sites BUT nothing at all in the problem sites leading me to conclude the file is not being read at all. </p>
  
  <p><strong>Silly Stuff</strong></p>
  
  <ul>
  <li>I have restarted apache </li>
  <li>.htaccess is spelled correctly.</li>
  <li>there are no overriding additional .htaccess files as far as i can tell.</li>
  </ul>