nginx默认下载配置

1330阅读 0评论2017-02-06 mfc42d
分类:LINUX

nginx配置文件

server {
   listen 4000;
   server_name localhost;
   root /study/apk;
   autoindex on;
   index  index.htm index.html;
   include mime.types;
   types{application/vnd.android.package-archive apk;}
   location ~* .(apk)$ {
     add_header Content-Type application/vnd.android.package-archive;
   }
   
    location / {
    }


    location /images/ {
    }


    location ~ \.(mp3|mp4) {
        root /www/media;
    }
 }









 sudo chown -R www-data /study/apk/*

上一篇:ubuntu 16.04网卡的命名
下一篇:make_ext4fs error: make_file: failed to allocate inode