0
我有在MAMP本地運行的CodeIgniter 3就好了。但是,當我從我的回購拉,並嘗試將其設置與安裝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]
設置服務器名。您在基本網址末尾忘記了斜線。它是否適用於url中的index.php? – Tpojka
控制器(和型號)文件名以大寫字母開頭? – DFriend