容器中的 Wordpress - 加载一些图像时得到 502 [英] Wordpress in Containers - getting 502 when loading some images

查看:42
本文介绍了容器中的 Wordpress - 加载一些图像时得到 502的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Azure AppService 中使用容器部署了 Wordpress(使用了 Azure 容器注册表)使用的图像来自 docker hub ->wordpress:最新我还启用了 --settings WEBSITES_ENABLE_APP_SERVICE_STORAGE=TRUE 以便我的文件保留在 VM 中

I have Wordpress deployed in Azure AppService with containers (Azure Container registry is used) the image used is from the docker hub -> wordpress:latest I also have --settings WEBSITES_ENABLE_APP_SERVICE_STORAGE=TRUE enabled so my files are persisted in the VM

我注意到图片没有显示

我看到 502 错误 - https://{website}.azurewebsites.net/wp-includes/images/spinner-2x.gif我已经与 KUDU 核对过,图片在那里

I see a 502 error - https://{website}.azurewebsites.net/wp-includes/images/spinner-2x.gif I have checked with KUDU and the image is there

有人能指出我解决这个问题的正确方向吗?

Could anyone point me into the right direction to fix this issue?

我已按照本教程中的步骤操作:https://docs.microsoft.com/en-us/azure/app-service/tutorial-multi-container-app

I have followed steps from this tutorial: https://docs.microsoft.com/en-us/azure/app-service/tutorial-multi-container-app

推荐答案

我向 Azure 开了一个支持票,他说这是一个 已知问题.当前的解决方法是禁用 apache2.conf 文件中的以下 apache 设置:

I opened a support ticket with Azure who said this is a known issue. The current workaround is to disable the following apache settings in the apache2.conf file:

EnableMMAP Off
EnableSendfile Off

如果您使用的是来自 mcr.microsoft.com/appsvc/php 的 Azure 基本 PHP 映像,则它们已在 7.4-apache_20210422.1 版本(可能还有任何更高版本)中内置了这些 apache 设置.请参阅 https://mcr.microsoft.com/v2/appsvc/php/tags/list 列出图像版本.

If you're using Azure's base PHP image from mcr.microsoft.com/appsvc/php, they've built in these apache settings in their 7.4-apache_20210422.1 version (and presumably any later versions). See https://mcr.microsoft.com/v2/appsvc/php/tags/list to list image versions.

这篇关于容器中的 Wordpress - 加载一些图像时得到 502的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆