title: How to set codeigniter for apache server?
body: <p><strong>Updated</strong>,
  I'm having some issues with deploying codeigniter project on Ubuntu server, i get 404 Apache error when i click on links.</p>
  
  <p>When i put the project in <a href="http://roy.my-domain.com/" rel="nofollow noreferrer">http://roy.my-domain.com/</a> = /var/www/html/ folder - it's all works fine - but when i added sub directory <a href="http://roy.my-domain.com/roy/" rel="nofollow noreferrer">http://roy.my-domain.com/roy/</a> = /var/www/html/roy/ - i get 404 errors .</p>
  
  <p>When my url is <a href="http://roy.my-domain.com/roy/index.php/about" rel="nofollow noreferrer">http://roy.my-domain.com/roy/index.php/about</a> - i get codeigniter 404 error and not apache2.</p>
  
  <p><strong>The error :</strong></p>
  
  <p>Not Found</p>
  
  <p>The requested URL /index.php was not found on this server.</p>
  
  <p>Apache/2.4.18 (Ubuntu) Server at roy.my-domain.com Port 80</p>
  
  <p>Here are my settings :</p>
  
  <p>0 . Checked for rewrite mod in Apache - got "Module rewrite already enabled"</p>
  
  <p>1 . <strong>My project is in /var/www/my-project/</strong></p>
  
  <p>2 . <strong>In contains the following :</strong>
      application
      system
      public_html
      index.php
      .htaccess</p>
  
  <ol start="3">
  <li><p><strong>The .htaccess file :</strong></p>
  
  <p>&lt; IfModule mod_rewrite.c >
        RewriteEngine On
        RewriteBase /html/my-project/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d</p>
  
  <p># Rewrite all other URLs to index.php/URL
    RewriteRule ^(.*)$ index.php?url=$1 [PT,L] </p>
  
  <p>&lt; /IfModule >
    &lt; IfModule !mod_rewrite.c>
       ErrorDocument 404 index.php
    &lt; /IfModule ></p></li>
  <li><p><strong>The apache2.conf :</strong></p>
  
  <p>&lt; Directory /var/www/ >
      Options Indexes FollowSymLinks
      Require all granted
  &lt; /Directory ></p>
  
  <p>&lt; Directory /var/www/html/ >
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
  &lt; /Directory ></p></li>
  <li><p><strong>The config.php :</strong></p>
  
  <p>$config['base_url'] = '<a href="http://roy.my-domain/my-project/" rel="nofollow noreferrer">http://roy.my-domain/my-project/</a>';
     $config['index_page'] = '';
     $config['uri_protocol']  = 'AUTO';</p></li>
  <li><p><strong>The index.php :</strong></p>
  
  <p>(don't work with ../system and ../application)
     $system_path = 'system';
     $application_folder = 'application';</p></li>
  <li><p><strong>The controllers :</strong></p>
  
  <p>(codeigniter default view) Welcome.php
  About_Controller.php</p></li>
  <li><p><strong>The views:</strong>
  (codeigniter default view) welcome_message.php
  about.php</p></li>
  </ol>
  
  <p>Locally - all works fine...Thanks</p>