apache配置 :
httpd.conf 增加
1.LoadModule php5_module "F:/php-5.2.14-Win32/php5apache2_2.dll"
2.PHPIniDir "F:/php-5.2.14-Win32"
3. 找到 DirectoryIndex index.html 增加index.php
4.找到 AddType application/x-gzip .gz .tgz 增加AddType application/x-httpd-php .php
5.打开以下
Listen 80 DocumentRoot "F:/Apache2.2/htdocs"
6.如果想打开apache日志切割 使用cronolog工具
找到 CustomLog "logs/access.log" common 增加
CustomLog "|bin/cronolog.exe logs/access.%Y-%m-%d.log" combined ErrorLog "|bin/cronolog.exe logs/error.%Y-%m-%d.log"
此处将cronolog.exe 文件放在f:apache2.2/bin/cronolog.exe位置
php 配置
php.ini 文件 下面几项打开
extension_dir = "F:/php-5.2.14-Win32/ext"
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
extension=php_mysql.dll
extension=php_mysqli.dll
php_mysql.dll php_mysqli.dll 两个文件拷贝到C:\WINDOWS\system32 下面
增加环境变量 F:\php-5.2.14-Win32;F:\php-5.2.14-Win32\ext; 此处可能有些重复
phpmyadmin
找到 config.sample.inc.php文件
$cfg['blowfish_secret'] = '';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '123456';
$cfg['LoginCookieValidity'] = '36000'; #36000 秒过期
apache 配置phpmyadmin 时 需要域名转发 ,同时有其他不同应用需要转发时 必须加上NameVirtualHost *:80 否则 只会转发至第一个开启的转发
NameVirtualHost *:80
<VirtualHost *:80>
ServerName abc.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ErrorLog logs/a.com_error_log
CustomLog logs/a.com_access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName db.a.com
DocumentRoot D:/Apache2.2/htdocs/db
ErrorLog logs/db.a.com_error_log
CustomLog logs/db.a.com_access_log common
</VirtualHost>
使用以上配置完成 apache php phpmyadmin mysql的配置,其他均为默认配置.配置项适合本人 ,如有需要可自行修改配置