How does the Win10 system build Apache and PHP environments?

  
                

A lot of developers will build a development environment for Apache and PHP, including many developers who have upgraded Win10. So how to build Apache and PHP environment in Win10 system? The method is similar to Win7/Win8.1, so let's give you a detailed introduction.

First to Microsoft's official website to download a system-digit Apache and PHP

First, install and configure Apache

Apache version: Apache2.4.18

Decompression directory: D: Acpache24

1. Download the extracted file, unzip it and place it in the location to be installed.

2, open the httpd.conf file under Apache24\\conf, modify the following key locations, open it with Notepad.

ServerRoot is modified to the location of the Apache program:

Before modification: ServerRoot “c:/Apache24”;

Before modification: ServerRoot “D:/Apache24”;

Modify the root directory of Apache's default website:

Before Modification: DocumentRoot “c:/Apache24/htdocs”;

After Modification: DocumentRoot “D:/Apache24/htdocs”;

Options for modifying the root directory:

Before modification:

<Directory “c:/Apache24/htdocs”>

Options Indexes FollowSymLinks

AllowOverride null

Require all granted

</Directory>

After Modification:

< Directory “D:/Apache24/htdocs”>

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

</Directory>< Br>

Start Apache

1.&###&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ; Command prompt window & rdquo;.

2, enter “d:” Enter, enter “cd Apache24\\bin” Enter, enter “httpd”, if there is no prompt, the startup is successful.

3, open the browser input “ http://localhost/” to test, as shown below to prove that the configuration is successful.

Second, install and configure PHP

PHP version: php5.6.12

Installation directory: d:php

1. Download the extracted files , unzip it and put it in the location to be installed.

2, copy php.ini-development, and renamed php.ini.

3, open Apache24\\conf under httpd.conf, at the end add

#php5 support

LoadModule php5_module “D:/PHP/php5apache2_4.dll”< Br>

AddHandler application/x-httpd-php .php

PHPIniDir “D:/php/”

4. Restart the Apache server.

(Install the server: 1. Open the command prompt window as administrator; 2. Enter “D:”, enter; 3. Enter “cd Apache24\\bin”, enter; 4. Enter “httpd.exe -k install -n ”Apache24“”, press Enter, you can install successfully; 5, "Win + R"; Run "lds; services.msc", open the service window, start "ldquo; Apache2 .4”Services;)

5. Delete other files in Apache24/htdocs, create a new index.php, and access the php information to indicate that php has been successfully installed.

The above is the Win10 system to build the Apache and PHP environment steps, if you want to develop Web server software, Win10 is a good choice for the development environment.

Copyright © Windows knowledge All Rights Reserved