How to Create Azure Web App on Windows or Linux using Azure CLI?

What is an App Service Plan?

An app service plan is a cloud computing model where an application is hosted on a server. You can host multiple apps on one server and pay only for what you use.

In this blog post, we'll walk through the process step by step of "How to create an app service plan for your website in Azure?".

Prerequisites:

  • Azure account
  • Active Azure Subscription
  • Requires contributor role to deploy the resources within a subscription.

Create an Azure App Service on Linux Server Plan:

Planning to Create an Azure App Service on Linux Server? then follow the below steps:

Step 1: Create an Azure Resource Group in your Select Subscription

az group create --location <add location> --name <add resource group name>

Step 2: Create an Azure App Service Plan of type Linux

az appservice plan create -g <add resource group name> -n <app service plan name> --is-linux

Step 3: Create an Azure Web App Service

az webapp create -g <resource group name> -p <app service plan name> -n <web app name> --runtime "<stackname>"

Create an Azure App Service on Windows Server Plan:

Planning to Create an Azure App Service on Windows Server? then follow the below steps:

Step 1: Create an Azure Resource Group in your Select Subscription

az group create --location <add location> --name <add resource group name>

Step 2: Create an Azure App Service Plan of type Windows

az appservice plan create -g <add resource group name> -n <app service plan name>

Step 3: Create an Azure Web App Service

az webapp create -g <resource group name> -p <app service plan name> -n <web app name> --runtime "<stackname>"