Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx 启用文件浏览 #7

Open
Ecss11 opened this issue May 8, 2022 · 0 comments
Open

Nginx 启用文件浏览 #7

Ecss11 opened this issue May 8, 2022 · 0 comments
Labels
案例 学习过程的实战经验

Comments

@Ecss11
Copy link
Owner

Ecss11 commented May 8, 2022

文件浏览功能使用 ngx_http_autoindex_module 模块实现,可选配置项不多。

location / {
    root /path/to/folder/;  
    autoindex on | off;   #开启nginx目录浏览功能
    autoindex_exact_size on | off;   #文件大小的大小格式
    autoindex_localtime on | off;   #服务器是否使用本地时间
}

在实际使用中,建议使用 location 搭配路由访问。

@Ecss11 Ecss11 self-assigned this May 8, 2022
@Ecss11 Ecss11 added the 案例 学习过程的实战经验 label May 8, 2022
@Ecss11 Ecss11 removed their assignment May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
案例 学习过程的实战经验
Projects
None yet
Development

No branches or pull requests

1 participant