镜像站nginx

server {
         listen   80  default_server;
         charset  utf-8;
         server_name   monitor.autoai.com;
         access_log    /srv/logs/nginx/monitor.autoai.com_access.log  nginxjson;
         error_log     /srv/logs/nginx/monitor.autoai.com_error.log;

         location /favicon.ico {
          root  /srv/data/devops/tools;
         }

         location  / {
          root   /srv/data/devops/tools/monitor;
          if ($request_filename ~* ^.*?\.(txt|doc|pdf|rar|gz|zip|docx|exe|xlsx|ppt|pptx)$){
            add_header Content-Disposition: 'attachment;';
            }
          autoindex     on;
          autoindex_exact_size   off;
          autoindex_localtime    on;
         }
}

转载于:https://www.cnblogs.com/tchroot/p/10789783.html

你可能感兴趣的:(镜像站nginx)