2017-04-13 14 views
0

私はCodeIgniter 3をMAMP上でローカルに実行しています。しかし、私は私のレポから引き出して、LAMPインストールされたEC2インスタンス上でそれを設定しようとすると、私は404 CodeIgniterのは/var/www/htmlフォルダ内にある取得CodeIgniter 3がLAMPで動作していません

/etc/apache2/apache2.confファイルには、次のものが含まれています

<Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
</Directory> 

<Directory /usr/share> 
    AllowOverride None 
    Require all granted 
</Directory> 

<Directory /var/www> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Require all granted 
</Directory> 

mod_rewriteが有効です。以下のようにファイル/etc/apache2/sites-available/000-default.confは次のとおりです。

<VirtualHost *:80> 
    AccessFileName .htaccess 
    ServerAdmin [email protected] 
    DocumentRoot /var/www/html/ 

    <Directory /> 
      AllowOverride All 
      Order allow,deny 
      allow from all 
    </Directory> 

    <Directory /var/www/html/> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride All 
      Order allow,deny 
      allow from all 
    </Directory> 

    ErrorLog ${APACHE_LOG_DIR}/error.log 
    CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost> 

ファイル/var/www/html/application/config/config.phpには、次の設定があります。次のように

$config['index_page'] = ''; 
$config['base_url'] = 'http://baseurl.com'; 

.htaccessファイルは次のとおりです。

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 
+0

設定サーバー名をサポートしていないので、database.phpでは は

'dbdriver' => 'mysqli', 

をご確認ください。あなたはベースURLの最後にスラッシュを忘れてしまった。それはURLのindex.phpで動作しますか? – Tpojka

+0

コントローラー(およびモデル)のファイル名は大文字で始まりますか? – DFriend

答えて

0

最初のサーバー構成を確認してください。あなたはサーバー関連の問題を見つけるために、Apacheのエラーログを使用することができます。 アプリケーションのエラーログを確認します。最新のランプは、バーチャルホストファイルに

'dbdriver' => 'mysql', 
関連する問題