Win10 system how to build Apache and PHP environment

  

First, download the Apache and PHP that meet the system digits on Microsoft's official website. 1. Install and configure Apache
Apache version: Apache2.4.18
Unzip directory: D: Acpache24
1. Download the extracted files, unzip them and put them in the location to be installed.
2, open the httpd.conf file under Apache24conf, modify the following key locations, open it with Notepad.
ServerRoot modified to the location of the Apache program:
Before the modification: ServerRoot “c:/Apache24”;
Before the modification: ServerRoot “D:/Apache24”;
Modify the Apache default website Root directory:
Before modification: DocumentRoot “c:/Apache24/htdocs”;
Modified: DocumentRoot “D:/Apache24/htdocs”;
Options for modifying the root directory:
Modify前:
"Directory “c:/Apache24/htdocs”"
Options Indexes FollowSymLinks
AllowOverride null
Require all granted
"/Directory"
Modified:
"Directory “D:/Apache24/htdocs”"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
"/Directory"
Start Apache
1,“Win + R”'s chat box input “cmd”, start “ command prompt window & rdquo;.
2, input “d:” Enter, enter “cd Apache24bin” Enter, enter “httpd”, if there is no prompt, the startup is successful.
3, open the browser input “ http://localhost /& rdquo; to test, as shown below shows that the configuration is successful.
Second, install and configure PHP
PHP version: php5.6.12
Installation directory: d:php
1, download the file is unpacked, unzip it and put it in the location to be installed.
2, copy php.ini-development, and renamed php.ini.
3, open httpd.conf under Apache24conf, at the end add
#php5 support
LoadModule php5_module “D:/PHP/php5apache2_4.dll”
AddHandler application/x-httpd-php . Php
PHPIniDir “D:/php/”
4, restart the Apache server.
(Install the server: 1. Open the command prompt window as the administrator; 2. Enter “D:”, Enter; 3. Enter “cd Apache24bin”, Enter; 4. Enter “httpd. Exe -k install -n ”Apache24“”, enter, you can install successfully; 5, "Win + R"; Run "lds; services.msc", open the service window, start "ldld; Apache2.4" service; )
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 step of Win10 system to build Apache and PHP environment. If you want to develop Web server software, Win10 is a good choice for development environment.

Copyright © Windows knowledge All Rights Reserved