location/filelist/centos6/{root/opt/static/;autoindex_localtimeon;autoindexon;}autoindex_localtimeon表示使用服务器上时区。这个默认是off的,有可能导致你发布的内容时间是其他时区的。autoindexon表示本虚拟目录开启遍历。
分类:
其他好文 时间:
2020-01-10 01:11:20
阅读次数:
113
1. 公司网络安全不让用vsftpd的匿名网络访问了, 没办法 只能够使用 nginx 通过http协议来处理. 2. 最简单的办法就是另外开一个nginx进程简单设置一下nginx的配置文件 worker_processes 1; events { worker_connections 1024; ...
分类:
其他好文 时间:
2019-12-31 12:27:01
阅读次数:
77
1、nginx开启目录浏览 提供下载功能 ~~~ 默认情况下,网站返回index指定的主页,但如果该网站不存在主页,则将请求交给autoindex模块 如果开启autoindex模块,则提供一个下载的页面, 如果没有开启autoindex 则会报错 403 [root@web01 centos] c ...
分类:
其他好文 时间:
2019-12-23 20:40:12
阅读次数:
104
Nginx 常用模块 1. ngx_http_autoindex_module bash ` Example location / { autoindex on; } bash ` 启用或禁用目录列表输出。 autoindex Syntax: autoindex on | off; Default: ...
分类:
其他好文 时间:
2019-12-16 19:03:03
阅读次数:
98
目录Nginx 概述 安装与使用 nginx 配置实战 更多内容 Nginx 本项目是一个 Nginx 极简教程,目的在于帮助新手快速入门 Nginx。 demos 目录中的示例模拟了工作中的一些常用实战场景,并且都可以通过脚本一键式启动,让您可以快速看到演示效果。 概述 安装与使用 安装 使用 n ...
分类:
其他好文 时间:
2019-12-06 13:56:16
阅读次数:
82
显示目录可以提供文件下载,方便文件共享时用到,mark一下。 1. 如何让nginx显示文件夹目录 vi /etc/nginx/conf.d/default.conf 添加如下内容: location / { root /data/www/file //指定实际目录绝对路径; autoindex o ...
分类:
其他好文 时间:
2019-11-29 22:16:28
阅读次数:
95
一、系统环境 ubuntu6.4系统 nginx 版本: nginx/1.10.3 (Ubuntu)。 二、打开目录浏览功能Nginx默认是不允许列出整个目录的。如需此功能,编辑虚拟主机配置文件,在location server 或 http段中加入autoindex on;另外两个参数最好也加上去 ...
分类:
其他好文 时间:
2019-11-12 12:56:35
阅读次数:
111
一、Nginx三大功能:反向代理、动静分离、负载均衡 二、反向代理 A、proxy_pass: http://.... 三、负载均衡 A、基本配置 1. http块 upstream 名字 { 服务器列表... } 2. location块 location / { proxy_pass:http: ...
分类:
其他好文 时间:
2019-11-05 01:18:17
阅读次数:
95
安全加固 Nginx安全加固: Nginx配置文件 (nginx.conf): 禁用autoindex: autoindex:是Nginx的目录浏览功能,如果不禁用该功能,就可以通过URL访问查看目录中的文件 为了防止文件目录的泄露我们必须要禁用 : off 或者不配置 关闭服务器标记: Nginx ...
分类:
其他好文 时间:
2019-10-07 11:13:31
阅读次数:
100
[autoindex:error] [pid 2628] [client 162.158.118.229:36792] AH01276: Cannot serve directory /var/www/stage/nadclinic/: No matching DirectoryIndex (index.php) found, and server-generated directory index forbidden by Options directive
分类:
Web程序 时间:
2019-09-21 11:02:48
阅读次数:
315