: This article mainly introduces how to build an APACHE + PHP runtime environment in WIN10. if you are interested in the PHP Tutorial, refer to it. Microsoft's new operating system Windows 10 is officially available in 190 countries and regions. users of genuine Windows 7 and Windows 8.1 can upgrade it free of charge within one year. This article describes how to install and configure Apache and PHP on the upgraded Windwos10 system (it is similar to Windows 7 and 8 ).
First, download Apache and PHP that match the number of system digits
- Http://www.apachelounge.com/download/
- Http://windows.php.net/download
Install and configure Apache
- Apache version: Apache2.4.18
- Decompress Directory: D: Acpache24
1) decompress the downloaded file and place it in the location to be installed.
2) open the httpd. conf file under Apache24 \ conf, modify the following key locations, and use notepad to open the file.
Change ServerRoot to the Apache program location:
Before modification: ServerRoot "c:/Apache24 ";
Before modification: ServerRoot "D:/Apache24 ";
Modify the root directory of the default Apache website:
Before modification: DocumentRoot "c:/Apache24/htdocs ";
After modification: DocumentRoot "D:/Apache24/htdocs ";
Modify the options of the root directory:
Before modification:
Options Indexes FollowSymLinks
AllowOverride null
Require all granted
After modification:
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Start Apache
1) in the "Win + R" chat box, enter "cmd" to start the "command prompt window ".
2) enter "d:" and press Enter. enter "cd Apache24 \ bin" and press Enter. If no prompt is displayed, the startup is successful.
3) open your browser and enter "http: // localhost/" for testing. if the configuration is displayed, it indicates that the configuration is successful.
Install and configure PHP
- PHP version: php5.6.12
- Installation directory: d: php
1) decompress the downloaded file and place it in the location to be installed.
2) copy php. ini-development and change it to php. ini.
3) open httpd. conf under Apache24 \ conf and 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.
(Server installation: 1. open the command prompt window as an administrator; 2. enter "D:" and press enter; 3. enter "cd Apache24 \ bin" and press enter; 4. enter "httpd.exe-k install-n" Apache24 "", press enter, and the installation is successful. 5. run "services" in "Win + R. msc, open the service window, and start the "Apache2.4" service ;)
5) delete other files in Apache24/htdocs and create an index. php. accessing the php information indicates that php has been successfully installed.
Reference: http://www.awspack.com/windows/win10-apache-php/
The above describes how to build an APACHE + PHP running environment locally in WIN10, including some content. I hope to help some friends who are interested in PHP tutorials.