Can I use the Azure web app service for PHP and NodeJs both in the same application?

2021-05-21T10:50:03.763+00:00

Hi ALL,

Can I use the Azure web app service for PHP and NodeJs both in the same application?
Following are my PHP Web app requirements. So can I used the Azure Web app service or need to deploy it on LAMP stack VMs only?

  
98460-image.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2021-05-24T18:55:17.907+00:00

    @Ashish Pandurang Karpe [RingZero Game Studio] , Apologies for the delayed response here.

    On App Service, you can host multiframework app ( in this case PHP and Nodejs). Please take a look at the demo on Making multi-language Azure Web Sites with PHP, node.js, .NET and more - (the demo is for Classic but similar steps for other frameworks holds good).

    Since app service is a multi-tenant service instead of a dedicate deployment, it uses host header in the incoming request to resolve the request to the correct app service endpoint.
    Leveraging Virtual applications and directories is one of the approaches and tweaking web.config, installing dependencies and extensions, as per your requirement.

    App Service is a service running on top of the Azure PaaS (platform as a service) infrastructure. App Service runs on a sandboxed environment with restrictions to the underlying machine. Also, Linux apps in App Service run in their own containers. No access to the host operating system is allowed, you do have root access to the container. Likewise, for apps running in Windows containers, you have administrative access to the container but no access to the host operating system.

    On the other hand, hosting a website on an Azure Virtual Machine (IAAS) is typically the same as you would deploy on-prem. You would typically install, design and configure the website in the same fashion. If the integrated frameworks works fine onpremise, then it would also work on Azure Virtual Machine (IAAS). If you need more control over the underlying machines, you may consider Azure VM apporach.

    I see that you have also posted the question on SO and received insights and pointers on this.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.