【发布时间】:2018-11-09 14:11:24
【问题描述】:
我正在尝试将我的 CI 项目从 Windows 中的本地主机移动到 Ubuntu。我正在与:
在我的 cognfig.php 中
$config['base_url'] = '';
$config['index_page'] = 'index.php';
我的虚拟主机:
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin mymail@mymail.com
ServerName mywebiml.com
ServerAlias www.mywebiml.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php
DocumentRoot /var/www/html/CLASE
</VirtualHost>
CI 应用程序的根文件夹是“CLASE”。 另外,我在 /etc/hosts 中添加了条目
MyIp mywebiml.com
MyIp www.mywebiml.com
问题是,当我尝试访问我的页面时,我不断收到来自 CI 的自定义 404 错误。
【问题讨论】:
-
您是否使用
a2ensite启用了您的网站? -
是的。它必须与 CI conf 有关,因为我得到了 codeIgniter 的自定义 404 错误。
标签: codeigniter ubuntu virtualhost