1.Apache Installation
Modify the http.conf file under the Apache24\conf folder:
(1) Modifying the root path of ServerRoot Apache
The default is ServerRoot "C:/apache24", modified to: ServerRoot "D:/phpenv/apache24"(that is, the folder where you unzipped)
(2) modify ServerName your host name
will be SERVERNAMEWWW.EXAMPLE.COM:80 removes the previous #, which is required when launching Apache from the command line.
(3) Modify the home folder directory that DocumentRoot Apache accesses (that is, the path location where the php,html code file is placed)
Apache default path is under Htdocs (D:\phpEnv\Apache24\htdocs), there will be a simple entry file index.html. This path can be modified on its own and can be configured in my own new folder and configured in the httpconf file to the newly created folder
DocumentRoot "C:/apache24/htdocs"
Modified to:
DocumentRoot "D:\phpEnv\www"
(4) Modify the Portal file configuration: DirectoryIndex generally we are index.php, index.html, index.htm as the portal of the Web project
Directoryindexindex.html
Revision changed to
DirectoryIndex index.php index.htm index.html
(5) Set the Serverscript directory
scriptalias/cgi-bin/"c:/apache24/cgi-bin/" to = = scriptalias/cgi-bin/"D:/phpenv/apache24/cgi-bin"
AllowOverride None
Options None
Require all granted
Revision changed to
AllowOverride None
Options None
Require all granted
(6) Test Apache Environment
Start---Run, enter cmd, and open a command prompt. Then enter the D:\phpEnv\Apache24\bin directory, enter httpd enter
You can test without an error (Keep the command window open).
Accessing the index.html file under the DocumentRoot Apache folder, the "it works" instructions are installed correctly and the service is started.
(6) Configuring Windows Services
The new command window enters into the \apache24\bin directory, typing the code line: Httpd.exe-k install-n "ServiceName", servicename means the service name is modified by itself, such as "Apache24".
2.php5.6 Installation
1. Copy the Php.ini-development file in the directory and rename it to php.ini he is a PHP configuration file
2. Add PHP support for Apache service
# PHP5 Support
LoadModule Php5_module E:/java/server/phpenv/php/php5apache2_4.dll
# Configure Thepath to PHP.ini
Phpinidir "e:/java/server/phpenv/php"
AddType application/x-httpd-php. php. phtml
3. Restart the service
Create a new index.php file, save it, access the information that appears in PHP to indicate that PHP has been successfully installed.
4. Common configuration changes (modify php.ini file)
(1) Time zone configuration:Date.timezone = Asia/shanghai
(2) MySQL database support: extension_dir = "ext", remove the front ";" and change to Extension_dir = "D:\phpEnv\php\ext" to open PHP extension support (ext folder is the file supported by many PHP extensions).
Remove the ";" in front of the following line
Extension=php_mysql.dll
Extension=php_mysqli.dll
The MySQL database can be supported by restarting the service.
The above describes the apache2.4+php5.6+mysql5.6 integration configuration, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.