Linux 常用工具
YUM
yum init system
create local repo yum
centos 7 init system
FTP
How to Install and Configure vsftpd on CentOS 6
vsftp install on centos 7
Email
aliyun ecs install email
postfix smtp on centos
centos 6 postfix smpt test
GIT
gogs install centos6
git command example
git format markdown
HTTP Web
apache exampe
h5ai web php file server
apache vhosgts code debug
Nginx Web
nginx install from source
nginx set directory autoindex
autoindex with h5ai web
nginx install pugin ngx-fancyindex
proxy internal vhost to web
dynamic and static by nginx
proxy directory second by nginx
nginx proxy gogs web
jenkns proxy from nginx
ssl certify by nginx
nginx threads fix to 9x
NTP
linux install ntp use asia date
VNC
vnc remote desktop
x11vnc on centos6
Firewall
iptables on centos 7
centos7 firewalld config
Kernel
centos kernel packages
kernel update to 3.10 on centos 6
SYSCTL 内核配置参数分析
NFS
centos6 install nfs servers
mount nfs to linux
mount nfs on centos 6
centos6 nfs verify permissions
SSH
ssh keygen rsa to client
ssh config diffent
Network
centos 7 config net-tool debug ifconfig
debug network card up or down
Samba
samba install on centos 6
samba config example
VIM
VIM using example
本文档使用 MrDoc 发布
-
+
首页
nginx set directory autoindex
# nginx-set-autoindex --- Nginx默认是不允许列出整个目录的。如需此功能,打开nginx.conf文件或你要启用目录浏览虚拟主机的配置文件,在server或location 段里添加上autoindex on;来启用目录流量,下面会分情况进行说明。 另外Nginx的目录流量有两个比较有用的参数,可以根据自己的需求添加: - autoindex_exact_size off; 默认为on,显示出文件的确切大小,单位是bytes。 改为off后,显示出文件的大概大小,单位是kB或者MB或者GB - autoindex_localtime on; 默认为off,显示的文件时间为GMT时间。 改为on后,显示的文件时间为文件的服务器时间 ## 1、整个虚拟主机开启目录流量 在server段添加 ```html location / { autoindex on; autoindex_localtime on; #之类的参数写这里 } ``` ## 2、单独目录开启目录流量 ### 2.1:直接二级目录开启目录流量 ```html location /down/ { autoindex on; } ``` ### 2.2:虚拟目录开启目录流量 ```bash location /down/ { alias /home/wwwroot/lnmp/test/; autoindex on; } ``` 详细参照:http://nginx.org/en/docs/http/ngx_http_autoindex_module.html 如果想希望做出漂亮的目录列表,支持header,footer则可以安装三方插件: http://wiki.nginx.org/NginxNgxFancyIndex 重启nginx,使其生效。
Bobby
2021年12月20日 23:10
分享文档
收藏文档
阅读
116
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码