下载安装包

地址为:

http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/binaries/win32/

安装成后

浏览器打开http://localhost/

Itworks!

说明安装成功

apache的配置

配置文件位于D:\tools\ApacheSoftwareFoundation\Apache2.2\conf目录下的

httpd.conf

主机名:ServerName192.168.1.5:80

定义应用发布目录:

DocumentRoot"F:\code"

在该目录下放置indext.html文件

内容:

<html>

<body>

<h1>

apacheworking!

</h1>

</body>

</html>

重新启动后报如下错误:

Forbidden

Youdon'thavepermissiontoaccess/onthisserver.

找到:

<Directory"F:/code">

OptionsIndexesFollowSymLinks改为:OptionsNone

AllowOverrideNone

Orderallow,deny

Denyfromall#将其改为allowfromall

</Directory>

当在浏览器输入:http://192.168.1.5/News/

显示结果:

ParentDirectory

.classpath

.project

.settings/

.svn/

AndroidManifest.xml

bin/

default.properties

gen/

lib/

res/

src/

需要作如下修改

<Directory"F:/code">

OptionsIndexesFollowSymLinks改为:OptionsNone

AllowOverrideNone

Orderallow,deny

allowfromall

</Directory>