1.在etc/di.xml中,在"将此Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink修改为Magento\Framework\App\View\Asset\MaterializationStrategy\Copy"下搜索<item name="view_preprocessed" xsi:type="object"> 1.将其添加到db INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;中 1.将其添加到db UPDATE core_config_data SET value = '0' WHERE core_config_data.path LIKE '%web/seo/use_rewrites%';中 1.运行此命令,sudo a2enmod重写
1条答案
按热度按时间7vux5j2d1#
错误-此页无法工作localhost当前无法处理此请求。HTTP错误500解决方案-1.在此函数
$realPath = $this->fileDriver->getRealPath($path);
下搜索受保护的函数isPathInDirectories($path, $directories)
,并将其替换为$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
2.将index.php和. htaccess从pub复制到。将index.php中的编辑要求复制到
require __DIR__ . '/app/bootstrap.php';
错误-CSS和JS未加载
解决方案-
1.在文件/etc/apache2/apache2.conf中导航〈目录/var/www/〉,将"不允许覆盖"更改为"允许覆盖全部"
1.最后将其添加到位于〈MagentoRootDirectory/app/etc〉的env.php中
1.在etc/di.xml中,在"将此
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
修改为Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
"下搜索<item name="view_preprocessed" xsi:type="object">
1.将其添加到db
INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;
中1.将其添加到db
UPDATE core_config_data SET value = '0' WHERE core_config_data.path LIKE '%web/seo/use_rewrites%';
中1.运行此命令,sudo a2enmod重写