我如何在Azure托管的dotnet核心Web应用程序上托管php脚本 [英] How can I host a php script on a dotnet core web app hosted at Azure

查看:79
本文介绍了我如何在Azure托管的dotnet核心Web应用程序上托管php脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图让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脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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