Running Laravel on Windows Azure Web Sites

A few days back I worked with a company that wanted to move their on-premises PHP solution to Windows Azure Web Sites. They are using Laravel ( as a framework for their solutions and they needed a quick and flexible way of publishing their sites to Windows Azure.

It turns out the solution to running Laravel on Windows Azure Web Sites was really quite simple: download the latest version of Laravel, add a web.config to the root of the unpacked ZIP-file to rewrite the URLs and upload to a Windows Azure Web Site via FTP. The web.config should have the following two rewrite rules:

<?xml version="1.0" encoding="utf-8"?>
        <rule name="RewriteRequestsToPublic">
          <match url="^(.*)$" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
          <action type="Rewrite" url="public/{R:0}" />
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <action type="Rewrite" url="public/index.php/{R:1}" appendQueryString="true" />

4 thoughts on “Running Laravel on Windows Azure Web Sites

  1. Pingback: Windows Azure Web サイトで Laravel を動かす | 雪猫ノート

  2. Pingback: 5 Things to Know Before/While You Learn Laravel (and try to put it on Windows Azure) | Denvycom

    • Hi Peter,

      As this was something we’ve done with a partner of ours, I really couldn’t say. I haven’t heard of any major performance issues from them, personally.

Leave a Reply