Nginx 文件下载服务器

萝らか妹 提交于 2020-02-11 12:38:22

nginx 主要配置文件 /etc/nginx/nginx.conf 

启动时 会加载 /etc/nginx/conf.d 文件夹下的所有以 .conf  结尾的配置文件

所有 在/etc/nginx/conf.d  下创建 static.conf 文件

server {
    listen      80;
    server_name  localhost;
  
    location /soft {
        root    /opt/;
        autoindex on;    #开启索引功能
        autoindex_exact_size off;  #关闭计算文件确切大小(单位bytes),只显示大概大小(单位kb、mb、gb)
        autoindex_localtime on;   #显示本机时间而非 GMT 时间
    }
}

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!