上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
摘要: nginx编译 wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz ./configure --prefix=/usr/local/nginx --add-module=../ngx_cache_purge-2.3 --with-http_stub_status_module --with-http_ssl_module -... 阅读全文
posted @ 2017-02-14 10:26 喝杯茶 阅读(606) 评论(0) 推荐(0) 编辑
摘要: user www www; worker_processes 1; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http{ include mime.types; default_t... 阅读全文
posted @ 2017-02-14 10:25 喝杯茶 阅读(300) 评论(0) 推荐(0) 编辑
摘要: server { listen 8090; location / { resolver 202.106.0.20 202.106.119.116; resolver_timeout 30s; proxy_pass http://$host$request_uri; } access_log /dat 阅读全文
posted @ 2017-02-14 10:24 喝杯茶 阅读(164) 评论(0) 推荐(0) 编辑
摘要: vim nginx.conf http { server_tokens off;} php-fpm fastcgi.conf或fcgi.conf fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 改为fastcgi_param SERVER_SOFTWARE nginx; 阅读全文
posted @ 2017-02-14 10:23 喝杯茶 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 依赖PCRE库,需要安装pcre,最多循环10次,超过后返回500错误, 依赖PCRE库,需要安装pcre,最多循环10次,超过后返回500错误, 1. rewrite模块指令 1. rewrite模块指令 break:完成当前设置的重写规则,停止执行其他的重写规则 if: if () {...} 阅读全文
posted @ 2017-02-14 10:22 喝杯茶 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 1.Nginx日志切割 1.Nginx日志切割 logrotate日志文件管理工具,通过cron程序定期执行,默认在cron默认程序的dayli目录下 /etc/logrotate.d 按照格式防止在改目录可根据crontab定期执行,也可收到执行/usr/sbin/logrotate 定义的格式文 阅读全文
posted @ 2017-02-14 10:21 喝杯茶 阅读(555) 评论(0) 推荐(0) 编辑
摘要: ngx_http_log_module用来定义请求日志格式1. access_log指令 语法: access_log path [format [buffer=size [flush=time]]] access_log path format gzi=[level] [buffer=size] 阅读全文
posted @ 2017-02-14 10:18 喝杯茶 阅读(2641) 评论(0) 推荐(0) 编辑
摘要: 1. root path 配置段:http、server、location、if 请求的uri加root后面的路径为系统上的完整路径 2. alias path 配置段:location 请求的uri需去掉location后面的路径加alias后面的路径为系统上的路径 如:请求 /binapp/a. 阅读全文
posted @ 2017-02-14 10:15 喝杯茶 阅读(2236) 评论(0) 推荐(0) 编辑
摘要: $arg_patameter HTTP请求中某个参数的值,如/index.php?site=www.ttlsa.com,可以用$arg_site取得www.ttlsa.com这个值 $args HTTP 请求中的完整参数 $binary_remote_addr 二进制客户端地址 $body_byte 阅读全文
posted @ 2017-02-14 10:15 喝杯茶 阅读(1305) 评论(0) 推荐(0) 编辑
摘要: 语法规则:location [= | ~ | ~* | ^~] /uri/ {....} = 表示精确匹配 ^~ 表示uri以某个常规字符串开头 ~ 表示区分大小写的正则表达式 ~* 表示不区分大小写的正则表达式 !~ !~* / 通用匹配,默认匹配 静态文件匹配规则实例 location ~* . 阅读全文
posted @ 2017-02-14 10:10 喝杯茶 阅读(275) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页