Apache2.2安装

貌似Apache官网从2.2.X之后不再发布Windows安装版本,需要的话得自己编译

从官网下载2.2.25(我下了一个no-ssl的),安装提示

因为本机已经安装IIS,占用80端口,修改Apache目录下conff\httpd.conf将Listen 80 改成Listen 81

启动Apache,输入http://127.0.0.1:81/提示 It Works!

 

DocumentRoot "c:/Apache24/htdocs"改为DocumentRoot "D:/www";//网站的根目录

<Directory "c:/Apache24/htdocs">改为<Directory " D:/www ">

2.PHP

下载php-5.4.29-Win32-VC9-x86.zip

将Apache httpd.conf的

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

修改为

<IfModule dir_module>
DirectoryIndex index.html index.php index.htm
</IfModule>

在httpd.conf任意位置添加三行,一般建议添加到末尾

php5_module "d:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php .htm

D:\ww目录下新建index.php<?php phpinfo(); ?> 浏览器输入http://127.0.0.1:81/访问
posted @ 2014-06-10 23:21  大侠的哥哥是菜鸟  阅读(249)  评论(0编辑  收藏  举报