[英]404 NOT FOUND error Magento installation process
I'am trying to install magento 2.4 on ubuntu 20.04我正在尝试在 ubuntu 20.04 上安装 magento 2.4
I've installed magento with composer.我已经用作曲家安装了 magento。
mysql and apach are running fine and php installed correctly as shown below mysql 和 apach 运行良好,php 安装正确,如下所示
All magento commands are working fine so I think magento is working.所有 magento 命令都工作正常,所以我认为 magento 工作正常。 But when I navigate to http://127.0.0.1/magento2/
I get 404 not found as shown below但是当我导航到http://127.0.0.1/magento2/
我得到 404 not found 如下所示
I think maybe the problem is with the configs of php and apache我认为问题可能出在 php 和 apache 的配置上
This is my magento config file这是我的 magento 配置文件
/etc/apache2/sites-available/magento2.conf
mysql and apach are running fine and php installed correctly: mysql 和 apach 运行良好,php 安装正确:
magento2 directory magento2 目录
The problem is wen I try to get the magento url, I get this error问题是我尝试获取 magento url,我收到此错误
UPDATED1:更新1:
http://127.0.0.1/
Looks like magento 2.4 not support web based installation.check this link看起来 magento 2.4 不支持基于 web 的安装。检查此链接
here are what I recommend for you:以下是我为您推荐的:
if you have install all the requirement system, follow this step:如果您已经安装了所有需求系统,请按照以下步骤操作:
<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
启用虚拟主机和 apache 重写: sudo a2ensite magento && sudo a2enmod rewrite
sudo systemctl restart apache2
重启 apache: 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
Hope this help you.希望这对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.