镜像站nginx

摘要:
server{listen80default_server;charsetutf-8;server_namemonitor.autoai.com;access_log/srv/logs/nginx/monitor.autoai.com_access.lognginxjson;error_log/srv/logs/nginx/monitor.autoai.com_error.log;location
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;
         }
}

免责声明:文章转载自《镜像站nginx》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇火狐foxyproxy + burpQT5:类总结下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

windows10中docker nginx开启 但页面访问不了

Windows下对docker端口进行映射,但是当你在主机的浏览器中,打开localhost:port无法访问对应的服务。 docker是运行在Linux上的,在Windows中运行docker,实际上还是在Windows下先安装了一个Linux环境, 然后在这个系统中运行的docker。也就是说,服务中使用的localhost指的是这个Linux环境的地...

Nginx实践:(2) Nginx语法之localtion

1. 概念 location是根据uri进行不同的定位。在虚拟主机的配置中,是必不可少的。location可以将网站的不同部分,定位到不同的处理方式上。 location语法格式如下: location [=|~|~*|^~] patt{ } 其中: (1) 当[]中的内容均不填写时,表示一般匹配 (2) "="表示精准匹配 (3) "~"表示正则匹配 ...

nginx负载均衡器处理session共享的几种方法(转)

1) 不使用session,换作cookie能把session改成cookie,就能避开session的一些弊端,在从前看的一本J2EE的书上,也指明在集群系统中不能用session,否则惹出祸端来就不好办。如果系统不复杂,就优先考虑能否将session去掉,改动起来非常麻烦的话,再用下面的办法。2) 应用服务器自行实现共享已知的,php可以用数据库或me...

Nginx压力测试及通用优化

nginx压测工具AB:ab由httpd-tools软件自带 1、安装压测工具AB [root@client1 /]# yum install httpd-tools -y 2、了解压测工具的使用方式 [root@client1 /]# ab -n 200 -c 2 http://127.0.0.1/ -n总的请求熟练 -c并发请求数 -k是否开启长连接...

docker容器的端口映射

1.创建一个Nginx 容器,先不映射端口 [root@localhost ~]# docker run --name my_nginx -d nginx 7be3673a4c0f8f7ffe79a7b11ab86c4327dacaf734ed574e88e28c1db2243716 [root@localhost ~]# docker ps -a...

nginx windows版本 1024限制

Windows版本因为文件访问句柄数被限制为1024了,当访问量大时就会无法响应。 会有如下错误提示:maximum number of descriptors supported by select() is 1024 修改参数worker_connections可以解决此限制,还有其它很多说修改worker_rlimit_nofile 参数等,都尝试...