Run php on Windows azure

Source: Internet
Author: User
Windows azure has been released for some time. The support of fast CGI allows PHP to run on it.

[More information for access to http://phpazure.com/]

With the following simple configurations, Your PHP can be published to the cloud.

1. servicedefinition. csdef

<Servicedefinition name = "cloudphp" xmlns = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<Webrole name = "webcgirole1" enablenativecodeexecution = "true">
<Inputendpoints>
<Inputendpoint name = "httpin" protocol = "HTTP" Port = "80"/>
</Inputendpoints>
<Configurationsettings>
<Setting name = "diagnosticsconnectionstring"/>
</Configurationsettings>
</Webrole>
</Servicedefinition>

2. Web. config

Add the following to the handlers node of system. webserver:Code

<Add name = "PHP-FastCGI" Path = "*. php" verb = "*" modules = "fastcgimodule"
Scriptprocessor = "% roleroot % \ approot \ PHP \ php-cgi.exe"
Resourcetype = "unspecified"/>

[Assume that your php files are stored in the project and directory/PHP]

3. Web. roleconfig

<Configuration>
<System. webserver>
<FastCGI>
<Application fullpath = "% roleroot % \ approot \ PHP \ php-cgi.exe"/>
</FastCGI>
</System. webserver>

</Configuration>

4. Of course, Your PHP files must be put into the project as content and published together.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.