我的 TYPO3 项目在 ddev 下出现 500 错误,抱怨受信主机模式
My TYPO3 project gets a 500 error under ddev, complaining about Trusted Hosts Pattern
当我在 ddev 中访问我的 TYPO3 网站时,我看到了 500 错误。
ddev logs
告诉我发生了什么:
2018/05/10 21:07:38 [error] 354#354: *45 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] and adapt it, if you want to allow the current host header 'typo3-master.ddev.local:8000' for your installation. in /var/www/html/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2728
我有 ddev v0.18.0 和 运行 ddev config
,并且我已经确认 AdditionalConfiguration.php 包含通用 $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
,所以它应该匹配任何内容,对吧?
TYPO3 v9 似乎无法使用包含端口的 trustedHostsPattern。您 运行 在端口 8000 上,对于 TYPO3 v9 和 ddev,请弄清楚如何在端口 80 上获取它。在 [=10= 上有关于如何找出其他可能使用端口 80 的故障排除说明]
当我在 ddev 中访问我的 TYPO3 网站时,我看到了 500 错误。
ddev logs
告诉我发生了什么:
2018/05/10 21:07:38 [error] 354#354: *45 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] and adapt it, if you want to allow the current host header 'typo3-master.ddev.local:8000' for your installation. in /var/www/html/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2728
我有 ddev v0.18.0 和 运行 ddev config
,并且我已经确认 AdditionalConfiguration.php 包含通用 $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
,所以它应该匹配任何内容,对吧?
TYPO3 v9 似乎无法使用包含端口的 trustedHostsPattern。您 运行 在端口 8000 上,对于 TYPO3 v9 和 ddev,请弄清楚如何在端口 80 上获取它。在 [=10= 上有关于如何找出其他可能使用端口 80 的故障排除说明]