我在ubuntu 16.04上安装了october cms。
安装程序,一切顺利,但当我尝试进入后端时,我收到404错误。
我google了,做了我能找到的一切:
我该怎么做才能解决这个问题?救命!
可能的解决方案可能是检查浏览器地址栏中提供的URL / URI。它需要与config / cms.php中的配置一致(供您参考:https://github.com/octobercms/october/blob/master/config/cms.php#L39)
对我来说,这需要确保我在AllowOverride all
的<Directory /var/www>
指令中有/etc/apache2/apache2.conf
。它默认设置为None,并覆盖了我放入vhost的所有允许。
如果您使用的是IIS,则需要添加一个带有以下重写规则的web.config文件,以使后端工作 -
<rewrite>
<rules>
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
如果您的服务器没有重写index.php到/然后可以使用以下url模式访问后端:
virtualhost.october/index.php/backend/