##file pwd
##/etc/nginx/conf.d/file.conf
## rm /etc/nginx/sites-enabled/default 
## service nginx reload
server {
  listen 80; 
  listen [::]:80 default_server;
  server_name 127.0.0.1;
  charset utf-8;
  root /var/www/html/;
  location / { 
    autoindex on;
    autoindex_exact_size off;
    autoindex_localtime on;
    if ($request_filename ~* ^.*?\.(txt|sh|json|conf|doc|pdf|rar|gz|zip|docx|exe|xlsx|ppt|pptx)$){
            add_header Content-Disposition: 'p_w_upload;';
         }
  }
}
