AmazonのEC2インスタンスに配置されたcodeigniterアプリケーションに問題があります。私はそれが正しく私の最初のページを表示http://xx.xx.xxx.107/を呼び出す場合 コード署名者URIの問題... URIが存在しません。デフォルトコントローラーセット
$config['base_url'] = 'http://XX.XX.XXX.107/';
$config['index_page'] = 'index.php';
この
は、(任意の特定のルールなし)私のroute.php実際$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
である(それはHome.php私のデフォルトのコントローラをロードし、家を示しています。 PHPビュー)。 しかし、sign_inフォームビューを表示する代わりにhttp://52.59.107.107/index.php/Home/sign_in_formを呼び出すと、再びホームビューが表示されます。
私はログ有効にし、これは私はあなたがログに見ることができるように、私はDEBUG取得しています
INFO - 2016-08-08 15:43:25 --> Config Class Initialized
INFO - 2016-08-08 15:43:25 --> Hooks Class Initialized
DEBUG - 2016-08-08 15:43:25 --> UTF-8 Support Enabled
INFO - 2016-08-08 15:43:25 --> Utf8 Class Initialized
INFO - 2016-08-08 15:43:25 --> URI Class Initialized
DEBUG - 2016-08-08 15:43:25 --> No URI present. Default controller set.
INFO - 2016-08-08 15:43:25 --> Router Class Initialized
INFO - 2016-08-08 15:43:25 --> Output Class Initialized
INFO - 2016-08-08 15:43:25 --> Security Class Initialized
DEBUG - 2016-08-08 15:43:25 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-08-08 15:43:25 --> Input Class Initialized
INFO - 2016-08-08 15:43:25 --> Language Class Initialized
INFO - 2016-08-08 15:43:25 --> Loader Class Initialized
INFO - 2016-08-08 15:43:25 --> Helper loaded: file_helper
INFO - 2016-08-08 15:43:25 --> Helper loaded: form_helper
INFO - 2016-08-08 15:43:25 --> Helper loaded: url_helper
INFO - 2016-08-08 15:43:25 --> Database Driver Class Initialized
INFO - 2016-08-08 15:43:25 --> Database Driver Class Initialized
INFO - 2016-08-08 15:43:25 --> Session: Class initialized using 'files' driver.
INFO - 2016-08-08 15:43:25 --> XML-RPC Class Initialized
INFO - 2016-08-08 15:43:25 --> Controller Class Initialized
INFO - 2016-08-08 15:43:25 --> Model Class Initialized
INFO - 2016-08-08 15:43:25 --> Model Class Initialized
INFO - 2016-08-08 15:43:25 --> Model Class Initialized
INFO - 2016-08-08 15:43:25 --> Model Class Initialized
INFO - 2016-08-08 15:43:25 --> Form Validation Class Initialized
DEBUG - 2016-08-08 15:43:25 --> Session class already loaded. Second attempt ignored.
INFO - 2016-08-08 15:43:25 --> File loaded: /var/www/core_ci/application/views/header.php
INFO - 2016-08-08 15:43:25 --> File loaded: /var/www/core_ci/application/views/home.php
INFO - 2016-08-08 15:43:25 --> File loaded: /var/www/core_ci/application/views/footer.php
INFO - 2016-08-08 15:43:25 --> Final output sent to browser
DEBUG - 2016-08-08 15:43:25 --> Total execution time: 0.1061
を得るものです - 2016年8月8日15時43分25秒 - >いいえURIが存在する。デフォルトのコントローラがを設定し、私はこのURLここhttp://xx.xx.xxx.107/index.php/Home/sign_in_form
を呼んでいる場合でも、私のサーバーに関するいくつかのデータ:。ここで
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
バーチャルホストApacheのファイル:
<VirtualHost *:80>
# 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 [email protected]
# 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
<Directory /var/www/html>
AllowOverride All
</Directory>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1
DirectoryIndex /index.php index.php
</VirtualHost>
は誰があること私がどこで失敗しているのか教えてくれますか?
ありがとうございます。
あなたは私は簡単にするために、ホームコントローラのテスト方法を用意し見ることができるように
Home.php
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('Home_model');
$this->load->model('Users_model');
$this->load->model('Credit_model');
$this->load->library('form_validation');
$this->load->library('language');
$this->load->library('alerts');
$this->load->library('session');
$this->load->helper('url');
// $this->load->helper('captcha');
}
public function test()
{
print_r('my test method');
}
を更新しました。 http://xx.xx.xxx.107/index.php/Home/testと呼ぶと、同じログシーケンスが得られ、生データをプリントする代わりにホームビューが表示されます。
正しいURiを取得できないため、デフォルトコントローラが実行されているようです。多くの研究の後
することができますHomeController.phpコードを表示しますか? –
@MaxGilbertアップデートのホームコントローラーの一部を参照 – agodoo
アップデートをありがとう。アプリケーションは間違いなくwww/public_htmlフォルダにあります。サブディレクトリはありません。 –