[英]404 NOT FOUND error Magento installation process
我正在嘗試在 ubuntu 20.04 上安裝 magento 2.4
我已經用作曲家安裝了 magento。
mysql 和 apach 運行良好,php 安裝正確,如下所示
所有 magento 命令都工作正常,所以我認為 magento 工作正常。 但是當我導航到http://127.0.0.1/magento2/
我得到 404 not found 如下所示
我認為問題可能出在 php 和 apache 的配置上
這是我的 magento 配置文件
/etc/apache2/sites-available/magento2.conf
magento2 目錄
問題是我嘗試獲取 magento url,我收到此錯誤
更新1:
http://127.0.0.1/
看起來 magento 2.4 不支持基於 web 的安裝。檢查此鏈接
以下是我為您推薦的:
如果您已經安裝了所有需求系統,請按照以下步驟操作:
<VirtualHost *:80>
ServerName magento.local
ServerAdmin webmaster@localhost
DocumentRoot /var/www/magento/
<Directory /var/www/magento/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
sudo a2ensite magento && sudo a2enmod rewrite
sudo systemctl restart apache2
bin/magento setup:install \
--base-url=http://magento.local/ \
--db-host=localhost \
--db-name=db_name \
--db-user=db_user \
--db-password=db_pass \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 \
--search-engine=elasticsearch7 \
--elasticsearch-host=localhost \
--elasticsearch-port=9200 \
--elasticsearch-index-prefix=magento2 \
--elasticsearch-timeout=15
希望這對您有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.