Let apache display the configuration method for the directory list
- 2020-05-06 12:09:34
- OfStack
1, apache displays the directory list
in http. Add the following code conf (such as a virtual host configuration, add within the virtual host configuration section), and the main directory index. pho, index. html, index. Delete
Alias /download "/download"
<Directory "/download">
Options Indexes
Order allow,deny
IndexOptions Charset=UTF-8
Allow from all
</Directory>
Where "/download" is the directory to display the list of files, parameter "Options Indexes" means to enable directory browsing, "IndexOptions Charset= UTF-8 "set the character set to eliminate Chinese characters.
2, access to the virtual directory can be used "http://ip/alias" in the form of , index.php or index.html files in the home directory can be replaced by the following code, the realization of "http://ip" can automatically jump to the specified virtual directory,"("count()",60)" 60 means the jump countdown to 60ms.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title> Are entering </title>
</head>
<body>
<form name=loading>
<p align=center> <font color="#0066ff" size="5"> Entering, please wait a moment </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 = "//www.jb51.net";}
}</script>
</p>
</form>
</body>
</html>