I,
Apache 5.4 -- httpd-2.4.4-win32.zip
PHP 5.4 -- php-5.4.15-Win32-VC9-x86.zip
Note that the thread security version of VC9 already contains PHP and Apache connector DLL, so you do not need to download this DLL.
Ii. Configuration
1. Apache
Use any editor to open the apache2.4/conf/httpd. conf file to start configuration.
1.1 set Apache location
Copy codeThe Code is as follows:
ServerRoot "D:/Program Files/apache2.4"
1.2 enable modules
I only removed the comments from the mod_rewrite module.
1.3 Add the following content under the Module Content
Copy codeThe Code is as follows:
LoadModule php5_module "D:/Program Files/PHP5.4, php5apache2_4.dll"
AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
AddHandler application/x-httpd-php. php
PHPIniDir "D:/Program Files/PHP5.4"
1.4 modify the server administrator email address
Copy codeThe Code is as follows:
ServerAdmin info@yoursite.com
1.5 modify the document root directory
Copy codeThe Code is as follows:
DocumentRoot "E:/www"
<Directory "E:/www">
1.6 find the path to replace the content
Copy codeThe Code is as follows:
ScriptAlias/cgi-bin/"D:/Program Files/apache2.4/cgi-bin /"
<Directory "D:/Program Files/apache2.4/cgi-bin">
1.7 If You Want To enable. htaccess, modify the content in <Directory "D:/www">
Copy codeThe Code is as follows:
AllowOverride All
1.8 add index. php to the index DIRECTORY
Copy codeThe Code is as follows:
DirectoryIndex index.html index. php
2. PHP
1.1 rename php. ini-development to php. ini.
1.2 modify extension path
Copy codeThe Code is as follows:
Extension_dir = "D:/Program Files/PHP5.4/ext"
1.3 cancel comments of the following rows
Copy codeThe Code is as follows:
Extension = php_curl.dll
Extension = php_mysql.dll
Extension = php_mysqli.dll
Extension = php_pdo_mysql.dll
Extension = php_soap.dll
1.4 if you use the PHP mail function, modify the following content:
Copy codeThe Code is as follows:
SMTP = smtp.yoursite.com
Smtp_port = 25
Sendmail_from = youremail@sender.com
1.5 last set the time zone
Copy codeThe Code is as follows:
Date. timezone = PRC
Iii. Installation
Install the Apache 2.4 Service to the system service, start-> Run, Enter cmd, and then enter the following line:
Copy codeThe Code is as follows:
Cd D:/Program Files/apache2.4/bin
Httpd.exe-k install-n "Apache24"
Compile an index. php file with the content <? Php phpinfo ()?>, Start the apache service and access the following http: // localhost/