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]
設定サーバー名をサポートしていないので、database.phpでは は
をご確認ください。あなたはベースURLの最後にスラッシュを忘れてしまった。それはURLのindex.phpで動作しますか? – Tpojka
コントローラー(およびモデル)のファイル名は大文字で始まりますか? – DFriend