windows 下apache安装

window下安装Apache

1、下载mis安装文件,地址:http://apache.freelamp.com/httpd/binaries/win32/httpd-2.2.16-win32-x86-openssl-0.9.8o.msi
2、不停地点next安装下来。
3、用文件编辑器,打开安装目录下的文件 /Apache Software Foundation/Apache2.2/conf/httpd.conf
4、#开头的行,表示注释行。
5、查找ServerName,添加如下类似配置: 
       ServerName dev80.appache.com
6、查找Listen 修改监听端口为8080,配置如下:
      Listen 8080
7、查找DocumentRoot,配置网站目录。配置如下:
    DocumentRoot "D:/Server/Apache2.2/website"
8、在目录D:/Server/Apache2.2/website 放入index.html 文件
9、设置起始页为index.html:
   <IfModule dir_module>
      DirectoryIndex index.html
   </IfModule>
10、在浏览器中浏览:
    http://localhost:8080
即可看到index.html的内容。
如果出现Forbidden    You don't have permission to access  on this server的情况
则修改相应权限,将Deny from all注释掉
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
# Deny from all
</Directory>

猜你喜欢

转载自runner36.iteye.com/blog/2068564