有时候我们想提供文件遍历或目录遍历的能力,比如提供文件下载,那么就可以使用nginx的autoindex能力,快速构建文件系统遍历的网页 样例 ?...目录文件页 配置 autoindex是nginx内置配置,可以直接使用 location /web { autoindex on; root /usr/local/nginx; } 其他配置...#改为off后,显示出文件的大概大小,单位是kB或者MB或者GB autoindex_exact_size off; #默认为off,显示的文件时间为GMT时间。...#改为on后,显示的文件时间为文件的服务器时间 autoindex_localtime on; root /usr/local/nginx; } 参考 nginx使用autoindex...Nginx打开目录浏览功能(autoindex)
简介 ngx_http_autoindex_module模块处理以斜杠('/')结尾的请求,并生成目录列表。...3.配置格式 Syntax: autoindex on | off; Default: autoindex off; Context: http, server, location 启用或禁用目录列表输出...Syntax: autoindex_exact_size on | off; Default: autoindex_exact_size on; Context: http, server, location...Syntax: autoindex_format html | xml | json | jsonp; Default: autoindex_format html; Context: http, server...Syntax: autoindex_localtime on | off; Default: autoindex_localtime off; Context: http, server, location
如:腾讯软件源 [腾讯软件源下AndroidSDK] 设置autoindex 原生的Nginx,在确保安装了ngx_http_autoindex_module模块后(一般安装Nginx都会有安装),即可使用...on; alias "/www/wwwroot/***.mintimate.cn/resources"; autoindex_exact_size off; autoindex_localtime...试试Fancyindex模块: [Fancyindex模块效果] 环境准备 环境准备: Nginx编译环境 Fancyindex源码 Fancyindex皮肤(可选) Nginx编译环境 什么是Nginx...fancyindex_time_format "%Y-%m-%d %H:%M";# 文件日期 fancyindex_localtime on;# 使用用户本地时间 } 之后,保存,浏览器访问即可看到效果...: [Fancyindex] 当然,之所以看不到我文章开头的效果,是因为我自定义了页头和页尾。
文章目录 ngx_http_autoindex_module 配置 autoindex autoindex_exact_size autoindex_localtime autoindex_format...实操 ngx_http_autoindex_module https://nginx.org/en/docs/http/ngx_http_autoindex_module.html ---- 配置...Example Configuration location / { autoindex on; } autoindex Syntax: autoindex on | off; Default...---- autoindex_exact_size autoindex_exact_size off; 默认为on,显示出文件的确切大小,单位是bytes。...改为off后,显示出文件的大概大小,单位是kB或者MB或者GB Syntax: autoindex_exact_size on | off; Default: autoindex_exact_size
on; # 开启目录浏览功能 autoindex_localtime on; # 显示本地时间 autoindex_format html; # 输入格式,可选项为html、xml...、json、jsonp autoindex_exact_size off; # 显示精确字节大小还是显示友好可读的大小 } 配置完成后重启Nginx,访问配置好的server_name即可看到效果...,效果如下: nginx-autoindex.png 美化目录浏览 Nginx自带的目录浏览功能看起来并不是那么美观,可以使用第三方模块ngx-fancyindex插件来美化目录浏览功能。...fancyindex_name_length 255; #最大名字长度 fancyindex_time_format "%Y-%m-%d %H:%M:%S"; } 重启以后就可以看到效果...header.html"; fancyindex_footer "/fancyindex/footer.html"; fancyindex_ignore "fancyindex"; 再次重启Nginx,就可以看到最终的效果了
/192.168.1.2 web1配置location 方式一 location /bbs/ { proxy_pass http://192.168.1.2/; #有“/” } 效果...location 方式二 如果在web1中加入location中多少加 “/” location /bbs/ { proxy_pass http://192.168.1.2; #无“/” } 效果...on; //开启目录浏览功能; autoindex_exact_size off; //关闭详细文件大小统计...,让文件大小显示MB,GB单位,默认为b; autoindex_localtime on; //开启以服务器本地时区显示文件修改日期! ...on; autoindex_exact_size off; autoindex_localtime on; } :wq!
koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; autoindex... on; } location /feidai-kafka-kudu/bin/slog { root /root; autoindex on; } location /feidai-canal-kafka.../bin/slog { root /root; autoindex on; } .........其中添加了两个location节点,配置autoindex on;使其能展示目录。...访问实例: 整合到监控平台的效果如下图 image.png
# Nginx 站点与认证 Nginx制作下载站点 autoindex autoindexexactsize autoindex_format autoindex_localtime 实现案例 Nginx...Nginx 编译的时候会自动加载该模块,但是该模块默认是关闭的,我们需要使用下来指令来完成对应的配置 # autoindex autoindex 指令启用或禁用目录列表的输出 语法 默认值 位置 autoindex...; autoindex off; http、server、location # autoindex_exact_size autoindex_exact_size 指令对应 HTLM...语法 默认值 位置 autoindex_exact_size ; autoindex_exact_size on; http、server、location # autoindex_format...创建一个目录,将压缩包放入其中,我这里创建的路径是 /opt/download mkdir /opt/download 然后把压缩包都放到该目录下 效果如下: [root@master download
/koi-android; 73 index index.html index.htm; 74 autoindex...on; 75 autoindex_localtime on; 76 autoindex_exact_size...最后运行效果: ?
最终效果查看: http://file.v2fy.com ? 将file.v2fy.com的解析到目标主机ip ?...server_name file.v2fy.com; charset utf-8; location / { alias /share/zhaoolee/; autoindex...on; autoindex_exact_size off; autoindex_localtime on; } } 重启nginx systemctl restart...查看file.v2fy.com效果 ? 最终效果查看: http://file.v2fy.com
其实很简单,借助完善靠谱的开源项目们,本文最终实现例子效果如下。 实现核心逻辑 说到 Web 目录索引服务,我们一般会想到的就是大名鼎鼎的 Nginx 或者它的竞品们了。...对某个路由下的页面开启 autoIndex 可以轻松实现列目录的功能,比如这样: location / { autoindex_format html; autoindex_localtime.../autoindex/footer.html; autoindex_format html; autoindex_localtime on;...autoindex_exact_size on; autoindex on; } 代码生效后,你将得到这样的文档结果: <!.../footer.html; autoindex_format html; autoindex_localtime on; autoindex_exact_size
今天老蒋在制作DEDECMS主题的时候需要调用热门的文章列表,根据效果如果在列表前面加上序号效果会好一些,最后需要实现如下图的效果。 这个序号是需要直接显示出来的,然后加上样式即可。...title="[field:title /]" target="_blank"> [field:global runphp='yes' name=autoindex...序列号的部分使用的是: [field:global runphp='yes' name=autoindex][/field:global] 同时我们用em进行包围,后面只要在em设置样式就可以。
同时,它还必须是下面的 autoindex_format 设置为 html 时才会有效果。最后我们会一起看例子。 autoindex_format 设置索引目录展示的形式。...autoindex_format html | xml | json | jsonp; 默认是 html ,就是我们上面看到的那个样子,还可以换成别的形式。后面我们一起测试时看效果。...autoindex_exact_size off; autoindex_format json; autoindex_localtime on; 看看效果,输出的结果是不是变成了下面这样的 json...但是大家会发现,size 表示的文件大小没有变化呀,前面说过了,autoindex_exact_size 只有在 html 的时候才会有效果。...这个我们后面测试时会见到效果。 ancient_browser_value 设定变量 $ancient_browser 的值。
持续更新 文字效果阴影 ? text-shadow: 5px 5px 5px #0000CC;/*右偏移 下偏移 阴影背景模糊*/ 块阴影 ?
localhost 指向的目录下面有文件和目录,访问时也会提示 403 Forbidden 可以通过给 location / 配置段添加额外参数使其支持显示目录文件,将以下代码放入 location / 中即可 autoindex...on; # 开启目录文件列表 autoindex_localtime on; # 显示的文件时间为文件的服务器时间 autoindex_exact_size on; # 显示出文件的确切大小,单位是bytes...,但我试的时候没看到效果 charset utf-8,gbk; # 避免中文乱码,使中文文件名可以正常显示 配置示例 location / { root /Users/liang/Sites...; index index.html index.htm index.php; autoindex on; autoindex_localtime on; autoindex_exact_size
auth_basic_user_file /etc/nginx/conf.d/htpasswd.users; #自动显示目录 autoindex... on; #改为off后,显示出文件的大概大小,单位是kB或者MB或者GB;即人性化方式显示文件大小否则以byte显示 autoindex_exact_size... off; autoindex_localtime on; } } 重载配置 nginx -s reload 访问页面 输入用户名和密码 ?...效果如下: ?
此案例实现的是侧边栏的滑入与滑出,主要用定时器来实现物体滑动时速度的控制,从而实现滑入滑出效果,下面是效果图: 下面是实现的js代码: window.onload=function()
error.log; http { server { listen 80; location / { autoindex...autoindex指令作用是当找不到index文件[默认index.html],会以html的格式返回文件服务根目录的文件列表。 2....c.txt时,nginx会到/data/www/找对应目录结构的文件,即/data/www/a/b/c.txt,具体分为以下几种情况: 1.文件存在,直接返回c.txt.文件的内容; 2.文件不存在,如果autoindex...实际效果 # /data/www目录结构 [root@localhost www]# tree . ├── a └── abc └── e 1 directory, 2 files 浏览器访问效果
飘雪效果 作者:matrix 被围观: 2,606 次 发布时间:2017-01-13 分类:零零星星 | 无评论 » 这是一个创建于 2056 天前的主题,其中的信息可能已经有所发展或是发生改变...这个季节看到TGP的LOL新闻页面的飘雪效果挺好看的。顺手就copy了下 飘雪效果网上貌似大多数代码都是http://x-team.com 。 css,js,png文件都整理出来了也就记录下。...add_action('wp_footer', 'snow_footer'); function snow_footer() { if ('1' === date("n")) {//一月份才会有飘雪效果...https://pan.baidu.com/s/1i5cAnhb#383t 提取码在#字符后面 注意需要修改snow.js 105行处代码 peace ---- P.S. 180206 jd页面的飘雪效果
渐变色取色环上临近的颜色。我找到rgb变化的规律后,手写了三个分段函数,他们的规律(参照色环上的顺序)大概是R变化时GB不变,G变化时RB不变,B变化时RG不变...
领取 专属20元代金券
Get大咖技术交流圈
汽车相关识别(Vehicle OCR)提供驾驶证识别、行驶证识别、车牌识别、车辆VIN码识别等多种服务,支持将图片上的文字内容,智能识别为结构化的文本,可应用于车主身份认证、ETC出行、违章识别、停车管理等多种场景,大幅提升信息处理效率。大幅提升信息处理效率。