php - Prestashop 迁移,index.php 未执行

标签 php ssl prestashop

我们的 prestashop 网店正在转移到新服务器。一切都已设置(除了商店 URL 搞砸了)index.php 脚本只是没有得到执行。它在我的浏览器中下载为一个名为“下载”的文件。这很奇怪,因为我可以从同一个地方执行 php,例如网络服务器附带一个包含 phpinfo 输出的基本文件,肯定是从同一个文件夹运行的。权限没问题。

Additional details (maybe important): For users to be able to purchase items while the process is done, the DNS records will be updated as soon as everything's ready. Till it's done I can't issue an SSL certificate, because the CA checks if the domain resolves to my ip. I don't wanna mess with self-signed either. So the store domain resolves to the new ip but only according to my local hosts file, and the store protocol is set to https, which is not right, but I haven't found a way to change it without the admin dashboard. It's running on a LEMP stack with PHP7, PHP FPM.

最佳答案

如果在 web 服务器配置文件中正确配置了 PHP FPM,它应该停止提供 php 文件下载。 (这将是最佳方案,适用于 99% 的网站)

问题是,为什么我在每隔一个页面正常工作后才得到这些,只是因为 Google Chrome 很烂。即使在隐身模式下,它也有一些内置的隐形缓存魔法,无法绕过。它是这样工作的:Chrome 意识到一旦您的站点有可用的 SSL 保护版本,因此一旦 http 返回 200 以外的任何响应代码,它就会开始将 http 重定向到 https。使用多个浏览器进行测试! :)

但即使在其他浏览器中无需强制重定向也可以访问 http 版本,Prestashop 还需要一些东西。我必须为指向新 IP 的域颁发有效证书。在数据库中手动禁用 SSL 根本行不通,Presta 比这更糟。我只能在 ssl 已经启用并且管理仪表板可用后才能恢复非 https 状态。

关于php - Prestashop 迁移,index.php 未执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41419124/

相关文章:

php - 每次使用 PDO 运行查询时是否都必须包含数据库连接器文件?

ssl - 我可以将 java keystore 与 TeamCity 一起使用吗?

java - keytool 错误 : java. lang.Exception : Keystore file exists, 但为空

iOS Prestashop Web 服务出现问题(kCFErrorDomainCFNetwork 错误 -1012。)

php - 从 prestashop 中的模块创建产品

javascript - 如何使用 php-function-output 作为 javascript 的输入?

PHP 闭包和隐式全局变量作用域

php - 带命名空间的 DOMDocument

c# - 在 Kestrel .NET Core 中加载由中间 CA 签名的 SSL 证书的正确方法

mysql - Prestashop - 在 adminController 中使用 $this->_select 时出现错误