发布于 2016-02-06 10:27:00 | 176 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Apache Web服务器

Apache是世界使用排名第一的Web服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件。


本文教大家配置apache显示目录列表的方法,有需要的朋友不妨参考下

1、apache中显示目录列表

在http.conf中加入如下代码(如有虚拟主机配置,加在虚拟主机配置段内),并把主目录内的index.pho,index.html,index.htm文件删除


Alias /download "/download"
  <Directory "/download">
    Options Indexes
    Order allow,deny
    IndexOptions Charset=UTF-8
    Allow from all
  </Directory>

其中“/download”是要显示文件列表的目录,参数"Options Indexes"表示启用目录浏览,"IndexOptions Charset=UTF-8"设置字符集,以消除中文乱码。

2、访问虚拟目录时可用"http://ip/alias"的形式,也可把主目录内的index.php或index.html文件用如下代码代替,实现用"http://ip"即可自动跳转到指定的虚拟目录,"("count()",60)"内的60表示跳转倒计时为60ms。


<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>正在进入</title>
</head>
<body>
<form name=loading> 
 <p align=center> <font color="#0066ff" size="5">正在进入,请稍等</font><font color="#0066ff" size="5" face="Arial">......</font>
  <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;"> 
  
  <input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;"> 
  <script>  
var bar=0  
var line="||"  
var amount="||"  
count()  
function count(){  
bar=bar+2  
amount =amount + line  
document.loading.chart.value=amount  
document.loading.percent.value=bar+"%"  
if (bar<99)  
{setTimeout("count()",60);}  
else  
{
window.location = "http://www.phperz.com";}  
}</script> 
 </p> 
</form>
</body>
</html>



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务