1. install Apache
Modify the configuration file httpd. conf after the apache_2.2.8-win32 installation is complete
Open the conf folder in the installation directory, find and open the httpd. conf file for configuration.
① Locate DocumentRoot and set its path to the path of the website to be mounted, for example, "C :\";
② Locate directoryindex, add index. php and index.htm after index.html, and separate them with a single space;
③ Add (modular configuration) at the end of the configuration file ):
Loadmodule php5_module "C:/PHP/php5apache2_2.dll
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. htm
Addtype application/X-httpd-PHP. html
④ CGI installation Configuration
Find addtype application/X-gzip. GZ. tgz and add the following line:
ScriptAlias/PHP/"C:/PHP /"
Addtype application/X-httpd-PHP. php
Note: ③, ④ either of them can be selected based on the nature of the website
⑤ If a 403 error occurs, modify the following content:
<Directory/>
Options followsymlinks
AllowOverride none
Order deny, allow
Deny from all
</Directory>
Then, change deny from all to allow.
Ii. install PHP
Unzip the php-5.2.4-Win32 to c: \ PHP and configure the php. ini file.
Find the php. ini file in the PHP Directory and open it,
① Change extension_dir to the directory where PHP/EXT is located. For example: "C: \ PHP \ Ext"
② Find doc_root =, and set the path to the website link to be mounted. For example: "c :\";
③ Locate; Session. save_path = "/tmp", remove ';' and set the directory for saving the session, as shown in figure
Session. save_path = "C:/PHP/session_temp ";
④ Remove the semicolon in the following sentence to better support MySQL and phpMyAdmin
Extension = php_mbstring.dll
Extension = php_gd2.dll
Extension = php_mysql.dll
⑤ PHP time difference: the difference is 8 hours
Locate; date. timezone =
Replace;
Date. timezone = PRC
6. Find libmysql. dll and php5ts. dll and copy them to c: \ windwos \ system32.
7. Find PHP. ini and copy it to c: \ windows.
Note: The system is Windows 2008 server.
Iii. Install MySQL
Install mysql-5.1.36-win32 to c: \ mysql, find my. ini after installation
① Find the data folder, copy it to D: \, and rename it database (this facilitates data backup)
② Open my. ini, find datadir =, and change it to "C:/database/" (current database path)
4. Install hMailServer-5.3.2-B1769
Create a MySQL DATA inventory during the installation of the hMailServer-5.3.2-B1769, at this time libmysql. DLL to hmailserver \ bin \, create a database again will not report an error.
① Locate phpwebadmin under hmailserver and copy it to c: \ phpwebadmin,
② Find the config-dist.php and rename it config. php. Open the file:
Change $ hmail_config ['rooturl'] To "http: // localhost/phpwebadmin "/"
5. Restart the apache service
Browse http: // localhost/phpwebadmin
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/zhouqc2010/archive/2010/07/12/5730067.aspx