title: 403 - Permission denied error on Ubuntu 14.04 - apache2
body: <p>This question has been asked many times and I have gone through most of the solutions but still no luck. </p>
  
  <p>I am trying to create a virtual host on a new installation of Ubuntu 14.04 LTS version and for some reason I am getting the following error. </p>
  
  <pre><code>You don't have permission to access / on this server.
  </code></pre>
  
  <p>This is what I have done so far.</p>
  
  <ol>
  <li>Created the following virtual host in <code>/etc/apache2/sites-available/om.conf</code></li>
  </ol>
  
  <p></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin root@localhost
          ServerName  om.localhost.com
          ServerAlias www.om.localhost.com
          DocumentRoot "/home/jay/Projects/om/public"
  
          &lt;Directory "/home/jay/Projects/om/public"&gt;
           Options Indexes FollowSymLinks
               Order allow,deny
               Allow from all
           AllowOverride All
           Require all granted
          &lt;/Directory&gt;
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
      &lt;/VirtualHost&gt;
  </code></pre>
  
  <ol start="2">
  <li><p>enabled the host using the following command</p>
  
  <p>sudo a2ensite om</p></li>
  <li><p>added an entry to <code>/etc/hosts</code></p></li>
  </ol>
  
  <p><code>
  127.0.0.1   localhost
  127.0.1.1   Desk-PC-Ubuntu-14-02-LTS
  127.0.0.1   om.localhost.com
  </code></p>
  
  <ol start="4">
  <li>set the permissions on the project directory using the following commands.</li>
  </ol>
  
  <p><code>
  sudo chown -R www-data:www-data om
  sudo chmod -R 755 om
  </code></p>
  
  <ol start="5">
  <li><p>Enabled the rewrite module</p>
  
  <p><code>
     sudo a2enmod rewrite
  </code></p></li>
  <li><p>Restarted apache2</p></li>
  </ol>
  
  <p><code>
    sudo service apache2 restart
  </code></p>
  
  <p>But still I get the same error. </p>
  
  <p>Can anyone please point out what I am doing wrong? </p>
  
  <p>The project is based on Zend Framework 1.12 and uses the following .htaccess files. </p>
  
  <pre><code>SetEnv APPLICATION_ENV "development"
  RewriteEngine On
  # The following rule tells Apache that if the requested filename
  # exists, simply serve it.
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  # The following rewrites all other queries to index.php. The 
  # condition ensures that if you are using Apache aliases to do
  # mass virtual hosting, the base path will be prepended to 
  # allow proper resolution of the index.php file; it will work
  # in non-aliased environments as well, providing a safe, one-size 
  # fits all solution.
  RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::$
  RewriteRule ^(.*)$ - [E=BASE:%1]
  RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
  </code></pre>