【发布时间】:2020-03-06 09:27:23
【问题描述】:
我在 Google Cloud Platform 上使用 Google VM 实例来运行我的实时服务器。我也在使用 CodeIgniter 来构建我的服务器。进入页面时可以加载默认路由,但是进入其他路由时,显示Apache 404错误:
找不到
在此服务器上找不到请求的 URL。
Apache/2.4.29 (Ubuntu) 服务器位于 35.186.147.249 端口 80
我的 Apache 配置文件位于 /etc/apache2/sites-available:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
我在网上查了一下,大多数人都说这是 Apache 的问题,但我不太确定。我将共享任何文件以解决此问题。
【问题讨论】:
标签: php apache2 codeigniter-3