apache 安装

下载安装包
地址为:
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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值