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 (http://laravel.com/) 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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="RewriteRequestsToPublic"> <match url="^(.*)$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> </conditions> <action type="Rewrite" url="public/{R:0}" /> </rule> <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" /> </conditions> <action type="Rewrite" url="public/index.php/{R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |
Pingback: Windows Azure Web サイトで Laravel を動かす | 雪猫ノート
Pingback: 5 Things to Know Before/While You Learn Laravel (and try to put it on Windows Azure) | Denvycom
Hey,
didn´t you have massive performance issues? If yes, how did you solve them?
Regards
Peter
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.