我在octobercms后端获得404

问题描述 投票:1回答:4

我在ubuntu 16.04上安装了october cms。

安装程序,一切顺利,但当我尝试进入后端时,我收到404错误。

我google了,做了我能找到的一切:

  1. 取消注释RewriteBase / on .htaccess
  2. 启用重写模块
  3. 在.conf站点文件中添加了“AllowOverride All”

我该怎么做才能解决这个问题?救命!

octobercms
4个回答
2
投票

可能的解决方案可能是检查浏览器地址栏中提供的URL / URI。它需要与config / cms.php中的配置一致(供您参考:https://github.com/octobercms/october/blob/master/config/cms.php#L39


1
投票

对我来说,这需要确保我在AllowOverride all<Directory /var/www>指令中有/etc/apache2/apache2.conf。它默认设置为None,并覆盖了我放入vhost的所有允许。


0
投票

如果您使用的是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>

0
投票

如果您的服务器没有重写index.php到/然后可以使用以下url模式访问后端:

virtualhost.october/index.php/backend/
© www.soinside.com 2019 - 2024. All rights reserved.