下载安装包
地址为:
http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/binaries/win32/
安装成后
浏览器打开http://localhost/
It works!
说明安装成功
apache的配置
配置文件位于D:\tools\Apache Software Foundation\Apache2.2\conf目录下的
httpd.conf
主机名:ServerName 192.168.1.5:80
定义应用发布目录:
DocumentRoot "F:\code"
在该目录下放置indext.html文件
内容:
<html>
<body>
<h1>
apache working!
</h1>
</body>
</html>
重新启动后报如下错误:
Forbidden
You don't have permission to access / on this server.
找到:
<Directory "F:/code">
Options Indexes FollowSymLinks 改为:Options None
AllowOverride None
Order allow,deny
Deny from all#将其改为allow from all
</Directory>
当在浏览器输入:http://192.168.1.5/News/
显示结果:
Parent Directory
.classpath
.project
.settings/
.svn/
AndroidManifest.xml
bin/
default.properties
gen/
lib/
res/
src/
需要作如下修改
<Directory "F:/code">
Options Indexes FollowSymLinks 改为:Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
地址为:
http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/binaries/win32/
安装成后
浏览器打开http://localhost/
It works!
说明安装成功
apache的配置
配置文件位于D:\tools\Apache Software Foundation\Apache2.2\conf目录下的
httpd.conf
主机名:ServerName 192.168.1.5:80
定义应用发布目录:
DocumentRoot "F:\code"
在该目录下放置indext.html文件
内容:
<html>
<body>
<h1>
apache working!
</h1>
</body>
</html>
重新启动后报如下错误:
Forbidden
You don't have permission to access / on this server.
找到:
<Directory "F:/code">
Options Indexes FollowSymLinks 改为:Options None
AllowOverride None
Order allow,deny
Deny from all#将其改为allow from all
</Directory>
当在浏览器输入:http://192.168.1.5/News/
显示结果:
Parent Directory
.classpath
.project
.settings/
.svn/
AndroidManifest.xml
bin/
default.properties
gen/
lib/
res/
src/
需要作如下修改
<Directory "F:/code">
Options Indexes FollowSymLinks 改为:Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>