How Windows Azure free space builds PHP websites/databases, domain bindings

Source: Internet
Author: User
Tags php website phpmyadmin strong password wordpress blog

July, an elephant for the people introduced the Chinese version of Windows Azure How to build a station, custom remote virtual machine, up to four cores, 28G of memory server, I believe a lot of webmaster, developer users are very enjoyable. However, the azure built-in system supports only SQL databases and does not support the familiar MySQL platform.

How to build PHP website, daily WordPress blog, phpwind/discuz! The Forum program needs a complete PHP+MYSQL platform environment, we can directly take advantage of the Azure platform Windows Server R2 cloud System, with the help of IIS 8.5+php+mysql Big Three, can build a complete PHP website, It also supports binding top-level domains, which can be accessed outside the network.

An Elephant reviews : The whole operation is like local build iis+php environment, concrete can refer to "Win8.1 System configuration Build iis8.5+php5.5.4", and also will add MySQL, domain name binding and other content.

Preparatory work:

First, PHP 5.5.X, according to the system version download 32-bit/64-bit, official website: http://windows.php.net/download

Second, phpMyAdmin database management tools, official website: http://www.phpmyadmin.net/

Third, MySQL database Tools, visit official website: http://dev.mysql.com/downloads/mysql/

PHP program any one, such as Phpwind program

Operation Steps:

I. Create an azure virtual machine (for example, Windows Server R2)

1, visit the Chinese version of Azure background: https://manage.windowsazure.cn/, choose New Virtual Machine , up to four core, 28G memory, set the virtual machine user name and password;

2, wait a moment, after the virtual machine is created, select the virtual machine You just created, open the port , manually add the HTTP name and 80 port (required);

3, wait a moment, you can open the HTTP port service;

4, finally, click on the bottom of the connection , you can manually download an RDP dedicated Remote Desktop Connection shortcut, double-click to run the Remote Desktop Connection, enter the system account + password, you can directly log on to the remote virtual machine.

Second, build iis+php environment

1, remote login Windows Server R2 virtual machine, open Server Manager, select the Add and Features Wizard, manually tick "Web server (IIS)", as shown in.

2, in the role of service, must choose CGI application development, such as;

3. After the IIS functions and roles are added, you can access http://127.0.0.1 with IE to check if you can open the IIS 8.5 Multilingual Welcome Interface

4, download PHP package, such as download VC11 x64 Thread Safe version of the compressed package, and extract to C:\inetpub\php directory;

5. Open Server Manager , select Administration, go to Internet Information Services (IIS) Manager , select the current Web site, double-click " Handler Mappings " in the IIS ribbon;

6, Choose Add Module map , request path input "*.php", module select fastcgimodule mode, executable file, file format can choose EXE program and select path:c \ Inetpub\php\php-cgi.exe, name such as PHP, finally determine the Add module mapping.

7, manually add the default document to the website:default.php and index.php two documents;

8, configure PHP: Enter the C:\inetpub\php directory, rename the file php.ini-development renamed to PHP.ini;

9, use Notepad to open the edit php.ini file, the image proposed to use Ctrl+f search location, the PHP environment default Date.timezone modified to Date.timezone= "Asia/hongkong", that is, modify the current system time zone, while the previous semicolon ”;” removed to take effect.

In addition, we have to activate the PHP extension, set the PHP extension directory, will be the corresponding DLL statement before the semicolon ";" Delete, as follows:

; Extension=php_gd2.dll changed to Extension=php_gd2.dll

; Extension=php_mbstring.dll changed to Extension=php_mbstring.dll

; Extension=php_mysql.dll changed to Extension=php_mysql.dll

; Extension=php_mysqli.dll changed to Extension=php_mysqli.dll

; Extension=php_pdo_mysql.dll changed to Extension=php_pdo_mysql.dll

Then search for Extension_dir, modify the path to Extension_dir = "C:\inetpub\php\ext\", while the preceding semicolon ";" Delete takes effect.

10, PS: (in the command line into the PHP installation directory, such as C:\inetpub\php\php.exe-m, enter the PHP-M command, you can view the DLL extension module opened).

III. deployment of MySQL Database

Since most PHP Web sites rely on MySQL databases, we also have to manually deploy database suites and services, when we simply download and install the MySQL database suite and automatically online Php+iis the environment.

Elephant alert : During the MySQL installation process, it is recommended to set the server machine mode with the default port of 3306, and also to set a strong password for the root administrator.

Iv. local testing of PHP programs

Now, we just need to manually deploy the PHP forum program in the C:\inetpub\wwwroot directory, you can install, run, Debug PHP Web site, as shown;

Five, Domain name binding, DNS resolution

When the PHP forum completed debugging, we can be the Azure virtual machine public IP binding domain name, turn on DNS resolution services, such as domestic dnspod service providers, can complete the site follow-up work, support external network access analysis.

1. Why do azure virtual machines support bound domain names?

A: This is because Azure assigns each virtual machine an independent public IP, which is the server IP address, to achieve the goal of building a station, specifically in the dashboard to query.

2, how to resolve the domain name and DNS?

Avatar: Azure players need to prepare a domain name, such as xiang8.tk, specifically can be used dnspod domain name resolution service, manually add the Azure public IP two a record, you can complete the site resolution service.

3. How does the extranet access my Azure virtual machine local site?

An elephant: This is very simple. Enter the root directory of the ip+ website directly, or the domain + website root directory. For example, an elephant randomly builds a demo station: Http://www.xiang8.tk/bbs (delay is around 0.020 seconds, the speed is amazing)

An Elephant review : Azure Virtual Machine station is ideal for novice, veteran webmaster, the overall experience is Windows full localization testing, relying on Iis+php+mysql Big Three, the operation is very concise, while the Azure server provides four core, 28G of memory and 140GB of traffic, this "free lunch (can be tested for 60 days)" is very tempting.

How Windows Azure free space builds PHP websites/databases, domain bindings

Related Article

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.