php - CodeIgniter display always default controller -


i have issue codeigniter application deployed on ec2 instance on amazon.

$config['base_url'] = 'http://xx.xx.xxx.107/'; $config['index_page'] = 'index.php'; 

this route.php (without particular rule)

$route['default_controller'] = 'home'; $route['404_override'] = ''; $route['translate_uri_dashes'] = false; 

actually if call http://xx.xx.xxx.107/ correctly show first page (it loads default controller home.php , shows home.php view). if call example http://xx.xx.xxx.107/index.php/test/simplepage, instead of showing simple page view, shows again default home view.

i enabled log, , going http://xx.xx.xxx.107/index.php/test/simplepage

info - 2016-08-08 17:27:50 --> config class initialized info - 2016-08-08 17:27:50 --> hooks class initialized debug - 2016-08-08 17:27:50 --> utf-8 support enabled info - 2016-08-08 17:27:50 --> utf8 class initialized info - 2016-08-08 17:27:50 --> uri class initialized debug - 2016-08-08 17:27:50 --> no uri present. default controller set. info - 2016-08-08 17:27:50 --> router class initialized info - 2016-08-08 17:27:50 --> output class initialized info - 2016-08-08 17:27:50 --> security class initialized debug - 2016-08-08 17:27:50 --> global post, , cookie data sanitized info - 2016-08-08 17:27:50 --> input class initialized info - 2016-08-08 17:27:50 --> language class initialized info - 2016-08-08 17:27:50 --> loader class initialized info - 2016-08-08 17:27:50 --> helper loaded: file_helper info - 2016-08-08 17:27:50 --> helper loaded: form_helper info - 2016-08-08 17:27:50 --> helper loaded: url_helper info - 2016-08-08 17:27:50 --> database driver class initialized info - 2016-08-08 17:27:50 --> database driver class initialized info - 2016-08-08 17:27:50 --> session: class initialized using 'files' driver. info - 2016-08-08 17:27:50 --> xml-rpc class initialized info - 2016-08-08 17:27:50 --> controller class initialized info - 2016-08-08 17:27:50 --> model class initialized info - 2016-08-08 17:27:50 --> model class initialized info - 2016-08-08 17:27:50 --> model class initialized info - 2016-08-08 17:27:50 --> model class initialized info - 2016-08-08 17:27:50 --> form validation class initialized debug - 2016-08-08 17:27:50 --> session class loaded. second attempt ignored. info - 2016-08-08 17:27:50 --> file loaded: /var/www/core_ci/application/views/header.php info - 2016-08-08 17:27:50 --> file loaded: /var/www/core_ci/application/views/home.php info - 2016-08-08 17:27:50 --> file loaded: /var/www/core_ci/application/views/footer.php info - 2016-08-08 17:27:50 --> final output sent browser debug - 2016-08-08 17:27:50 --> total execution time: 0.0225 

as can see in log, i'm getting debug - 2016-08-08 15:43:25 --> no uri present. default controller set., if i'm calling url http://xx.xx.xxx.107/index.php/test/simplepage

here data server:

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 

here vhost apache file:

<virtualhost *:80>    # leave alone. setting tells apache   # vhost should used default if nothing   # more appropriate available.    servername default:80    # required. set directory want use   # “default” site files.    documentroot /var/www/html    # optional. uncomment , set admin email   # address, if have one. if there server error,   # address apache show users.    #serveradmin you@example.com    # optional. uncomment if want specify   # different error log file default.   # need create error file first.    #errorlog /var/www/vhosts/logs/error_log    <directory /var/www/html>     allowoverride   </directory>    proxypassmatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1   directoryindex /index.php index.php </virtualhost> 

this test controller built investigate (test.php filename capitalized)

<?php if ( ! defined('basepath')) exit('no direct script access allowed'); class test extends ci_controller {         public function __construct()         {                 parent::__construct();                 $this->load->helper('url');         }          public function simplepage()         {                 $data['title'] = 'home';                 $data['uriok'] = $this->uri->uri_string();                  $this->load->view('test',$data);         } } 

here view file

<html lang="en"> <head>     <title id='description'>this simple test page.</title> </head> <body class='default'> <div id='jqx'>     <div style="margin top: 10px;"><?php echo($title) ?></div>     <div style="margin-top: 10px;"><?php echo($uriok) ?></div> </div> </body> </html> 

if execute on localhost works, showing me html page

<html lang="en"> <head>     <title id='description'>this simple test page.</title> </head> <body class='default'> <div id='jqx'>     <div style="margin top: 10px;">home</div>     <div style="margin-top: 10px;">test/simplepage</div> </div> </body> </html> 

if try run on ec2 fails said... execute again default controller , show default view. seems not able uri correctly, runs default controller. think there wrong in configuration not able find where.

is there can tell me i'm failing?

thanks in advance.


Comments