Codeigniter URI issue...No URI present. Default controller set
<p>I have an issue with my codeigniter application deployed on an EC2 instance on Amazon.</p>

<pre><code>$config['base_url'] = 'http://XX.XX.XXX.107/';
$config['index_page'] = 'index.php';
</code></pre>

<p>This is my route.php (without any particular rule)</p>

<pre><code>$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
</code></pre>

<p>Actually if I call <a href="http://xx.xx.xxx.107/" rel="nofollow">http://xx.xx.xxx.107/</a> it correctly show my first page (it loads my default controller Home.php and shows home.php view).
But if I call for example <a href="http://52.59.107.107/index.php/Home/sign_in_form" rel="nofollow">http://52.59.107.107/index.php/Home/sign_in_form</a>, instead of showing sign_in form view, it shows again home view.</p>

<p>I enabled log, and this is what I get</p>

<pre><code>INFO - 2016-08-08 15:43:25 --&gt; Config Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Hooks Class Initialized
DEBUG - 2016-08-08 15:43:25 --&gt; UTF-8 Support Enabled
INFO - 2016-08-08 15:43:25 --&gt; Utf8 Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; URI Class Initialized
DEBUG - 2016-08-08 15:43:25 --&gt; No URI present. Default controller set.
INFO - 2016-08-08 15:43:25 --&gt; Router Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Output Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Security Class Initialized
DEBUG - 2016-08-08 15:43:25 --&gt; Global POST, GET and COOKIE data sanitized
INFO - 2016-08-08 15:43:25 --&gt; Input Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Language Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Loader Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Helper loaded: file_helper
INFO - 2016-08-08 15:43:25 --&gt; Helper loaded: form_helper
INFO - 2016-08-08 15:43:25 --&gt; Helper loaded: url_helper
INFO - 2016-08-08 15:43:25 --&gt; Database Driver Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Database Driver Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Session: Class initialized using 'files' driver.
INFO - 2016-08-08 15:43:25 --&gt; XML-RPC Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Controller Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Model Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Model Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Model Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Model Class Initialized
INFO - 2016-08-08 15:43:25 --&gt; Form Validation Class Initialized
DEBUG - 2016-08-08 15:43:25 --&gt; Session class already loaded. Second attempt ignored.
INFO - 2016-08-08 15:43:25 --&gt; File loaded: /var/www/core_ci/application/views/header.php
INFO - 2016-08-08 15:43:25 --&gt; File loaded: /var/www/core_ci/application/views/home.php
INFO - 2016-08-08 15:43:25 --&gt; File loaded: /var/www/core_ci/application/views/footer.php
INFO - 2016-08-08 15:43:25 --&gt; Final output sent to browser
DEBUG - 2016-08-08 15:43:25 --&gt; Total execution time: 0.1061
</code></pre>

<p>As you can see in the log, I'm getting <strong>DEBUG - 2016-08-08 15:43:25 --> No URI present. Default controller set</strong>., even if I'm calling this url <a href="http://xx.xx.xxx.107/index.php/Home/sign_in_form" rel="nofollow">http://xx.xx.xxx.107/index.php/Home/sign_in_form</a> </p>

<p>Here some data about my server:</p>

<pre><code>PHP Version 5.5.35
System  Linux ip-xx-x-x-xxx 4.4.8-20.46.amzn1.x86_64 #1 SMP Wed Apr 27 19:28:52 UTC 2016 x86_64
Build Date  May 2 2016 23:29:10
Server API  FPM/FastCGI
</code></pre>

<p>Here the vhost Apache file:</p>

<pre><code>&lt;VirtualHost *:80&gt;

  # Leave this alone. This setting tells Apache that
  # this vhost should be used as the default if nothing
  # more appropriate is available.

  ServerName default:80

  # REQUIRED. Set this to the directory you want to use for
  # your “default” site files.

  DocumentRoot /var/www/html

  # Optional. Uncomment this and set it to your admin email
  # address, if you have one. If there is a server error,
  # this is the address that Apache will show to users.

  #ServerAdmin you@example.com

  # Optional. Uncomment this if you want to specify
  # a different error log file than the default. You will
  # need to create the error file first.

  #ErrorLog /var/www/vhosts/logs/error_log

  &lt;Directory /var/www/html&gt;
    AllowOverride All
  &lt;/Directory&gt;

  ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1
  DirectoryIndex /index.php index.php
&lt;/VirtualHost&gt;
</code></pre>

<p>Is there anyone that can tell me where I'm failing?</p>

<p>Thanks in advance.</p>

<p><strong>UPDATED</strong></p>

<p>Home.php</p>

<pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
        public function __construct()
        {
                parent::__construct();
                $this-&gt;load-&gt;model('Home_model');
                $this-&gt;load-&gt;model('Users_model');
                $this-&gt;load-&gt;model('Credit_model');
                $this-&gt;load-&gt;library('form_validation');
                $this-&gt;load-&gt;library('language');
                $this-&gt;load-&gt;library('alerts');
                $this-&gt;load-&gt;library('session');
                $this-&gt;load-&gt;helper('url');
//        $this-&gt;load-&gt;helper('captcha');
        }

public function test()
{
        print_r('my test method');
}
</code></pre>

<p>As you can see I prepared for simplicity a test method in Home controller.
If I call <a href="http://xx.xx.xxx.107/index.php/Home/test" rel="nofollow">http://xx.xx.xxx.107/index.php/Home/test</a> I get the same log sequence and it shows the home view instead of printing my raw data.</p>

<p>It seems that as it is not able to get correct URi, it run default controller.</p>