【问题标题】:How to display magento site or setup page instead of showing the directory. I have shared screenshot如何显示 magento 站点或设置页面而不是显示目录。我分享了截图
【发布时间】:2021-02-13 12:34:11
【问题描述】:

我对 php 和 magento 开发还很陌生。我正在使用 apache2 作为网络服务器。 我已经在 var/www/html 的 magf 目录中安装了 magento 2 当我在浏览器中输入 http://localhost/magf/ 时,它显示的目录不是站点或安装页面。 花了很多时间和教程,但直到现在还没有解决方案。

【问题讨论】:

    标签: php wordpress content-management-system magento2 magento-1.4


    【解决方案1】:

    自 Magento 2.3.6 起,安装向导已根据Magento documentation 弃用,因此如果您使用较新版本,则不会看到安装页面。

    使用新版 Magento 的唯一途径install it is via CLI

    Example:

    $ bin/magento setup:install --base-url=http://localhost/magf/pub/ \
    --db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
    --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
    --admin-user=admin --admin-password=admin123 --language=en_US \
    --currency=USD --timezone=America/Chicago --use-rewrites=1 \
    --search-engine=elasticsearch7 --elasticsearch-host=es-host.example.com \
    --elasticsearch-port=9200
    

    安装应用程序后,使用当前的 apache 配置,您应该能够看到该站点转到 pub/ 文件夹。

    注意:从 Magento 2.4 开始,您还需要在主机设置中安装 elasticsearch。

    【讨论】:

    • 您的答案不是最新的,不起作用。
    • @Y.JoyCh.Singha 你是什么意思它不起作用。你能指定吗?
    猜你喜欢
    • 2017-02-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-25
    • 2014-06-28
    • 1970-01-01
    • 2015-08-01
    相关资源
    最近更新 更多