title: Debugging why I get "You don't have permission to access" in Apache 2.4
body: <p>I am trying to create a local environment in Linux/Ubuntu.</p>
  
  <p>I have install Apache 2.4.7 (using apt-get).</p>
  
  <p>I have changed my /etc/hosts to this:</p>
  
  <pre><code>127.0.0.1   example.dev
  127.0.0.1   localhost
  ...
  </code></pre>
  
  <p>I also added a file "example.dev.conf" to "/etc/apache2/sites-available" which looks like this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.dev
      DocumentRoot "/home/yahya/path/to/projec"
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
      &lt;Directory "/home/yahya/path/to/project"&gt;
          AllowOverride All
          Require all granted
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>
  
  <p>But when I go to example.dev I get the following message:</p>
  
  <blockquote>
    <p>403 Forbidden! You don't have permission to access / on this server.</p>
  </blockquote>
  
  <p>I also edited apache.conf part for <code>&lt;Directory /&gt;</code> from suggestions from this link: <a href="https://stackoverflow.com/questions/21551840/forbidden-you-dont-have-permission-to-access-on-this-server">Forbidden You don&#39;t have permission to access / on this server</a> and <a href="https://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server">Error message &quot;Forbidden You don&#39;t have permission to access / on this server&quot;</a></p>
  
  <p>from:</p>
  
  <pre><code>&lt;Directory /&gt;
      Options FollowSymLinks
      AllowOverride None
      Require all denied
  &lt;/Directory&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;Directory /&gt;
      Options Indexes FollowSymLinks Includes ExecCGI
      AllowOverride All
      Order deny,allow
      Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>I have used a2ensite. But still does not work.</p>