Tinus vd H Tinus vd H

Azure Web App with SQL DB – from Start to Secure

This guide aims to help developers and IT infrastructure staff set up an Azure Web App service as well as an Azure SQL Database as quickly as possible. Detailed explanations have been taken out to help keep this article brief and to the point.

1 – Create a Web App and SQL Database

We will make use of the “Web App + SQL” Azure Marketplace template to get us started. Log in to the Azure portal and navigate to the “Marketplace”. Search for “Web App + SQL” and select the “Web App + SQL” Azure template. Click “Create” to start configuring a new Azure App Services Web App and SQL Database.

  1. Name your Web App
  2. Specify the Subscription where this will live under
  3. Create a new Resource Group or Choose an existing Resource Group
    • For security reasons, every independent project or system should live in its own Resource Group
  4. Choose you App Service Plan and hosting location
    • This will determine the datacentre where your web app(s) will be hosted as well as the underlying resources your we apps will have access to (thus affecting the monthly costs).

App Service Demo Setup

Next, we will specify the configurations for the Azure SQL database. Start by clicking on the “SQL Database” section of the Create wing and Select “Create a new database”.

  1. Enter a name for your SQL database
    • This is the name of the actual database you will be using for your web app
    • You can always change this or add more databases later
  2. Next, we need to configure the virtual SQL Server instance our database(s) will be running on. Click on “Target Server”.
    • Click on “Create a new Server”
    • You can now name the SQL Server instance
      • This will be used to connect to and identify your database server
    • Specify a Username for the main SQL Server instance Admin user.
    • Specify a very strong, randomly generated password for this username
      • I highly recommend using a password manager that will help you to generate random passwords, while also keeping your passwords secure and always on hand.
    • Lastly, select the datacentre hosting location for this SQL Server instance
      • Normally you would host the SQL Server instance in the same datacentre as your web application, in order to reduce latency.
Azure SQL DB Demo Setup

That’s all you need to provision an Azure Web App and SQL DB. Click confirm and “Create” and Azure will start provisioning these services for you.

Next I will take you through the process of securing your Azure Database, while pointing out a few best-practices and considerations for a production environment.

Part 2 – Setup and Secure your database

Share Post :

More Posts

Leave a Reply

Prove you are a humanoid *