1. Download two installation files, apache_2.2.4-win32-x86-no_ssl.msi and php-5.2.1-win32-installer.msi;
2. install Apache to the C: \ Program Files directory. For the three textbox that Apache needs to enter, enter localhost, localhost, and localhost@xxx.com.
Because IIS has been installed on the machine and port 80 is used, an error is reported during installation. Ignore this error.
Then open the httpd. conf file under the c: \ Program Files \ Apache Software Foundation \ apache2.2 \ conf directory and change:
Listen 80 is listen 8080
Servername localhost: 80 is servername localhost: 8080
Restart Apache and enter http: // localhost: 8080 to display it works. Apache is installed normally;
3. Install PhP5, create the Directory D: \ PhP5 on disk D, and install PhP5 to this directory.
To install PhP5, select the Apache configuration file directory and select c: \ Program Files \ Apache Software Foundation \ apache2.2 \ conf.
After the installation is complete, restart Apache. Then, in the default site directory c: \ Program Files \ Apache Software Foundation \ apache2.2 \ htdocs, edit
Test. php file, content: <? PHP phpinfo ();?>
Then visit: http: // localhost: 8080/test. php. The PHP flag and information are displayed normally. OK.
4. Change the virtual directory. Because it is generally impossible to run to the Apache directory on drive C to store many of your websites Programs , create the Directory Sites under D: \ PhP5. Open httpd in the
Apache configuration file c: \ Program Files \ Apache Software Foundation \ apache2.2 \ conf. in the conf file, find
and modify
to
restart Apache and enter http: // localhost: 8080/test. PHP: displays the PHP logo and information. The installation is complete.