欢迎光临IT网Linux学习频道

当前位置: > Linux服务器 > nginx >
  • [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进程意...

  • [nginx] nginx根据不同的UserAgent来做缓存的配置策略 日期:2015-06-28 20:46:38 点击:64 好评:0

    it.net.cn使用了nginx缓存,因为要为手机做适配,所以nginx需要对同一个页面比如首页http://it.net.cn/需要根据当前访问用户使用的浏览器是PC机浏览器还是手机浏览器来做不同的缓存。 nginx的缓存足够灵活,只要适当的配置就可以做到这一点,首先需要在nginx...

  • [nginx] Nginx屏蔽访问过于频繁的IP 日期:2015-06-28 20:46:09 点击:99 好评:0

    今天公司的网站,有几个IP过于频繁的访问,频繁查询数据库,导致机器负载很高,于是根据实际情况 屏蔽掉访问频繁的IP,问题得以解决,在这里贴出来,供大家参考参考. 脚本需要根据实际的nginx log 格式,修改,取出 访问IP 和User-Agent. 在nginx配置文件中添加一条配...

  • 首页
  • 上一页
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 下一页
  • 末页
  • 2012009
栏目列表
推荐内容