欢迎光临IT网Linux学习频道

当前位置: > Linux服务器 >
  • [nginx] nginx给静态文件添加浏览器缓存过期设置 日期:2015-06-28 20:54:15 点击:77 好评:0

    在nginx中可以方便的给静态文件添加缓存过期的响应头,来最大可能优化网页的加载速度,节省服务器的带宽。 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 30d; add_header Pragma public; add_header Cache-Control public; }上面的配置会给所有的i...

  • [nginx] 在nginx中集成lua脚本:添加自定义Http头,封IP等 日期:2015-06-28 20:53:30 点击:61 好评:0

    这几个月里,我们逐步把Lua集成到Mixlr的前端Nginx配置中。 Lua是一个可以嵌入到Nginx配置文件中的动态脚本语言,从而可以在Nginx请求处理的任何阶段执行各种Lua代码。刚开始我们只是用Lua 把请求路由到后端服务器,但是它对我们架构的作用超出了我们的预期...

  • [nginx] nginx定制500,502,503,504页面 日期:2015-06-28 20:52:44 点击:137 好评:0

    最近比较烦,有些页面出不来就显示504 gateway timeout了,一方面得想办法解决问题,另外一方面也想给nginx配置一个自定义的错误静态页面,别让用户看504 gateway timeout。 查了下资料,配置很简单: server { listen 80; error_page 500 /500.html; error_p...

  • [nginx] Nginx Proxy 代理图片静态文件缓存配置 日期:2015-06-28 20:50:43 点击:114 好评:0

    图片服务器使用 Nginx 的 proxy_store 把主服务器的静态内容缓存到本地。一次访问结束后,以后的访问将直接在本地硬盘上读写。从而分担流量负载 server { include listen.conf; server_name ucenter.gznow.org; location ~ \.php$ { limit_conn one 20; limit...

  • [nginx] nginx封ip,禁用IP段的设置说明 日期:2015-06-28 20:50:17 点击:72 好评:0

    nginx的ngx_http_access_module 模块可以封配置内的ip或者ip段,语法如下: deny IP; deny subnet; allow IP; allow subnet; # block all ips deny all; # allow all ips allow all;如果规则之间有冲突,会以最前面匹配的规则为准。 如何配置禁用ip或ip段呢?...

  • [nginx] python删除nginx反响代理缓存代码 日期:2015-06-28 20:49:53 点击:132 好评:0

    #!/usr/bin/env python Clear nginx a url cache import os try: from hashlib import md5 except: from md5 import md5 url=raw_input(Please enter url : ) isClr=raw_input(You sure you want to clear %s cache ? (y/n) % url) if isClr==y or isClr==Y :...

  • [nginx] python分析apache和nginx日志文件输出访客ip列表 日期:2015-06-28 20:49:28 点击:116 好评:0

    ips = {} fh = open(/var/log/nginx/access.log, r).readlines() for line in fh: ip = line.split( )[0] if 6 len(ip) =15: ips[ip] = ips.get(ip, 0) + 1 print ips...

  • [nginx] nginx在fastcgi模块中转发真实的客户端ip地址 日期:2015-06-28 20:48:26 点击:106 好评:0

    fastcgi_buffers 8 128k; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_scrip...

  • [nginx] nginx 报错 upstream timed out (110: Connection timed out)解决方案 日期:2015-06-28 20:47:46 点击:95 好评:0

    nginx每隔几个小时就会报下面的错误: 2013/05/18 21:21:36 [error] 11618#0: *324911 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 42.62.37.56, server: localhost, request: GET /code-snippet/...

  • [nginx] nginx报错 "readv() failed (104: Connection reset by peer)" 解决方法 日期:2015-06-28 20:47:23 点击:85 好评:0

    nginx错误日志中出现Connection reset by peer : [error] readv() failed (104: Connection reset by peer) while reading upstream, client: x.x.x.x, server: host.tld, request: POST /script.php, ...出现这种情况可能是因为php的配置参数导致php进程意...

  • 首页
  • 上一页
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 下一页
  • 末页
  • 5405398
栏目列表
推荐内容