问题描述
所以我试图让php脚本在Azure的dotnet核心Web应用上运行。
我在wwwroot / php /文件夹中添加了一些php脚本。
我认为,要执行此脚本,就像进入domain.com/php/script.php一样容易。但是我只能得到404。我已经验证了文件是否存在,所以我不确定为什么会收到404s。
我还需要做其他事情才能使它正常工作吗?
您可以创建一个虚拟目录来实现此目的。在
so I am trying to get a php script to run on a dotnet core web app in Azure.
I added some php scripts to the wwwroot/php/ folder.
I assumed it would be as easy as going to domain.com/php/script.php in order to execute this script. But I only get 404 when I do. I have verified that the file is there so I am not sure why I get 404s..
Is there anything else I need to do in order for this to work?
You could create a Virtual directory to achieve this. From the Azure portal, select your app service and click on Application settings, then scroll down to Virtual applications and directories. Just enter your virtual directory and the physical path as below, after that done click Save button.
这篇关于我如何在Azure托管的dotnet核心Web应用程序上托管php脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!