nginx作为下载站点的简单配置

server {
        listen 80;
        server_name www.ylw.com;
        root /soft/www;
        index index.html;
        location /mystatus {
                stub_status on;
                access_log off;
        }
        location /down {
                root /soft/package/src;
                #开启目录索引
                autoindex on;
                #使用系统时间,off时显示GMT 时间
                autoindex_localtime on;
                #关闭计算文件确切大小(单位bytes),只显示大概大小(单位kb、mb、gb)
                autoindex_exact_size off;
        }
        location /down-alias {
                #使用别名设置
                alias /soft/package/src;
                autoindex on;
                autoindex_localtime on;
                autoindex_exact_size off;
        }
}

你可能感兴趣的:(nginx作为下载站点的简单配置)