Home > Article > Backend Development > Alibaba Cloud win builds php environment
Alibaba Cloud is the cloud server service provider chosen by many enterprises and individuals. As a giant in the field of cloud computing, Alibaba Cloud provides various cloud servers and cloud services, on which we can easily build our applications.
This article will introduce how to build a PHP environment based on Windows system on Alibaba Cloud server.
1. Select the server
First of all, we need to choose a server suitable for PHP to run. On the Alibaba Cloud official website, we can see a variety of options: ECS, lightweight application server, container service, etc. Among them, ECS (Elastic Cloud Server) is the most common choice because it provides more customization options.
Therefore, here we take an ECS instance as an example to introduce.
2. Install Windows system
We can choose to install operating systems such as Windows Server 2008, 2012 or 2016. This article takes Windows Server 2012 as an example and installs it in an ECS instance.
On the ECS instance management page, select Create instance. On the instance configuration page, select the Windows Server 2012 R2 Datacenter version image, and then select instance specifications, storage and other related parameters to configure.
In the network and security group configuration, you can choose public IP or intranet IP for access, and set it according to actual needs.
Finally, after the instance name, password, etc. are configured, click the "Create Instance" button and wait for the instance creation to be completed.
3. Install IIS
Before installing IIS, we need to install .NET Framework 3.5, open the server manager, select "Add Roles and Features", and select "Web Server ( IIS)" and ".NET Framework 3.5" and complete the installation.
Then, we need to add PHP to IIS. First, download the corresponding version of PHP from the PHP official website (http://windows.php.net/download/), and then extract it to the local directory.
In IIS Manager, right-click "Default Web Site" and select "Add Application". In the "Add Application" dialog box, enter the alias and application pool name, select the local path and PHP version, etc. Information, complete the addition.
4. Test
Enter the IP address or domain name of the server in the browser, and add "/phpinfo.php" at the end to view PHP-related information.
Summary
Through the above steps, we have built a PHP environment based on Windows system. Alibaba Cloud provides a very friendly interface and powerful functions, which can help us easily build our own applications. It should be noted that we need to open relevant ports in the security group to prevent attacks and other issues.
The above is the detailed content of Alibaba Cloud win builds php environment. For more information, please follow other related articles on the PHP Chinese website!