Application Frameworks Now Part of the Windows Azure Web Sites Gallery

A recent addition to the Windows Azure Web Sites Gallery has me very excited, support for installing Web Application Frameworks. Installing a Web Application Framework from the Windows Azure Web Sites Gallery provides the benefit of speed and simplicity during setup by means of implicit configuration for Windows Azure Web Sites.

Let’s take a look at how we can set up Django, a Web Framework for Python applications, using the Windows Azure Management Portal.

Setting up Django on Windows Azure Web Sites

This article makes the assumption that you already have a Windows Azure Subscription. If this is not the case sign up for the 90 day free trial of Windows Azure.

  1. Log into the Windows Azure Management Portal.
  2. Click on the + New button
    drawer-waws-new
  3. Select Compute > Web Site > From Gallery
    drawer-waws-fromgallery
  4. Select App Frameworks
    gallery-appframeworks
  5. Click Next
    gallery-appframeworks-django
  6. Click Complete
    waws-django
  7. Click Browse
    drawer-waws-browse
  8. Start Building!

    Did you know there are Python Tools for Visual Studio?

    waws-django-works

Why is this useful?

Having these packages installable from the Windows Azure Web Site Gallery ensures that you’re receiving a great experience when using the Application Framework of your choice. Once the site is configured, simply download the files using FTP to begin development, or upload your application specific files from your local installation of the same framework.

How to use CakePHP on Windows Azure Web Sites

One day Last week, I set out to get a simple CakePHP site up and running on Windows Azure Web Sites.

CakePHP is an open source MVC framework for building PHP applications.

CakePHP is a framework, which means ideally, there should not be anything specific to get it working on any platform. As I suspected this is exactly the case, you can simply:

  1. Download CakePHP 2.2.1
  2. Unzip the Package
  3. Deploy to Windows Azure Web Sites
    1. Upload files to Windows Azure Web Sites with FTP or;
    2. Deploy Windows Azure Web Sites applications with Git
  4. Build your Application
    1. I used the CakePHP Blog Tutorial to test the functionality

CakePHP on IIS (aka Windows Azure Web Sites)

One thing to note about hosting CakePHP applications on Windows Azure Web Sites is that your site will be running in IIS. As such you do need to add a web.config to your deployment to get the friendly urls to work as IIS does not know how to decipher .htaccess files [Import Apache mod_rewrite rules using IIS Url Rewrite tool].

Here is a sample web.config file [found on the CakePHP site] for running CakePHP in Windows Azure Web Sites.

Happy Clouding!