Site一些页面重定向到Https Magento 2

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

我在本地系统中设置了虚拟主机,并且我的主页运行正常,但是如果我尝试将任何产品添加到购物车中,则会抛出错误:无法连接并重定向到https。

我不知道我要去哪里错了。

我的虚拟主机文件:

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName local.test.com
    ServerAlias www.local.test.com
    DocumentRoot /var/www/html/test
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/test>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>
</VirtualHost>

core_config_data的magento设置中,我尝试并正确设置了基本网址,有什么我想念的东西或者需要删除才能完美地移动我的网站吗?

php .htaccess magento2 virtualhost
1个回答
0
投票

您需要为您的站点配置不安全和受保护的基本Urls。看这里:https://docs.magento.com/m2/ce/user_guide/stores/store-urls.html

在管理员侧边栏上,转到Stores > Settings > Configuration > General > Web

Base URLs选项卡中设置您的URL,并在Base URLs (Secure)选项卡中设置相同的URL。

© www.soinside.com 2019 - 2024. All rights reserved.