我正在Google Cloud Platform上使用Google VM实例来运行我的实时服务器。我还使用CodeIgniter构建服务器。进入页面时,它可以加载默认路由,但转到其他路由时,它显示Apache 404错误:
未找到
在此服务器上找不到请求的URL。
位于35.186.147.249端口80的Apache / 2.4.29(Ubuntu)服务器
位于/etc/apache2/sites-available
的我的Apache配置文件:
<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的问题,但我不太确定。我将共享任何文件以解决此问题。