One of the first things to note is that there are many tutorials on the web, such as:
Add the PHP module to the Apache configuration file. In the apache2\conf\httpd.conf:
LoadModule Module Add line:
LoadModule php5_module "D:/programfiles/php5.4.4/php5apache2_2.dll"
Phpinidir "c:/php"
Indicates the loading of PHP module information;
In the AddType module add:
addtypeapplication/x-httpd-php. php
AddType application/x-httpd-php. html
Represents the type of file that PHP executes.
Php5apache2_2.dll This file many people will find in the PHP home directory is not! That's because of the PHP version problem, the version has VC6/VC9/VC11 and so on, I downloaded the VC9.
First, install Apache2.2.15, double hit open msi
The Welcome screen appears
Click Next, then select "I accept the terms in the license Agreement", then click "Next" to continue
Continue Next
First, second fill in localhost, third fill in your email, click Next
Select Custom, click Next
Install all, and then click the Change button to alter the installation path and then next
Click Install installation.
After installation, the http://localhost/appears in the browser input to indicate successful installation.
Second, the installation of PHP, in fact, there is nothing to install, he is a compressed file, to his decompression to the location you specify just fine. Oh yes, my installation directory is D:\Apache2.2 D:\php
Three, now speak configuration.
Open the Apache installation directory under conf in configuration file httpd.conf.
LoadModule module Last Added
LoadModule php5_module "D:/php/php5apache2_2.dll"
Phpinidir "d:/php"
In the AddType module add
AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
Configure PHP, enter the PHP directory, copy the php.ini-development file and rename it to PHP.ini
Configure the Extension_dir directory after opening
Remove the preceding comments from the php.ini file as follows
Change this sentence
Create a new index.php under the Site directory:
<?php
Phpinfo ();
?>
Write in the browser http://localhost/index.php appears this page indicates success
Add:
Note: In the installation of Acache, we also want to download the corresponding VC library, download should also pay attention to the corresponding x86 and x64 problems
Modify the root path of ServerRoot Apache: serverroot "path/apache" Modify ServerName Your host name: #ServerName localhost:80 can be changed to www. domain name. com:80
Modify the Home folder directory for DocumentRoot Apache access: DocumentRoot "D:/apache2.2/htdocs" <directory "D:/apache2.2/htdocs" >
To modify the Portal file configuration:
DirectoryIndex generally we are index.php, index.html, index.htm as the portal of the Web project
Apache Default portal only index.html need to add the other two support, of course, the entrance file settings can be increased or decreased according to their own needs
If the requirements are more stringent, you can write only one index.php, so that the entry in the project can only be index.php
<ifmodule dir_module>
DirectoryIndex index.html
</IfModule>
Can be made
<ifmodule dir_module>
DirectoryIndex index.html index.php
</IfModule>
(The above content has the reference network, but actually for oneself practice summary of (*^__^*) hehe ... )
Apache2.2 + php-5.4.45-win32-vc9-x86 Configuration