1、if指令所有的nginx内置变量都可以通过if指令和正则表达式来进行匹配,并且根据匹配结果进行一些操作,如下:if
($http_user_agent ~ MSIE) { rewrite ^(.*)$ /msie/$1 break;}if ($http_cookie ~*
"id=([^...
分类:
其他好文 时间:
2014-05-01 13:08:26
阅读次数:
418
#用户 用户组 user www www;
#工作进程,根据硬件调整,有人说几核cpu,就配几个,我觉得可以多一点 worker_processes 5; #错误日志 error_log
logs/error.log; #pid文件位置 pid ...
分类:
其他好文 时间:
2014-05-01 11:20:40
阅读次数:
431
摘要:对于一个大型网站来说,负载均衡是永恒的话题。随着硬件技术的迅猛发展,越来越多的负载均衡硬件设备涌现出来,如F5 BIG-IP、Citrix
NetScaler、Radware等等,虽然可以解决问题,但其高昂的价格却往往令人望而却步,因此负载均衡软件仍然是大部分公司的不二之选。nginx作为we...
分类:
其他好文 时间:
2014-05-01 03:02:33
阅读次数:
382
最近在尝试自己写一个Http服务器,在粗略研究了nginx的代码之后,决定仿照nginx中的部分设计自己实现一个高并发的HTTP服务器,在这里分享给大家。...
分类:
其他好文 时间:
2014-04-29 13:38:21
阅读次数:
345
1、效果图:
2、核心代码:
package com.example.pic_reflection;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import and...
分类:
移动开发 时间:
2014-04-29 13:35:22
阅读次数:
520
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags ...
分类:
其他好文 时间:
2014-04-29 13:24:23
阅读次数:
443
Problem Description
In the Wide Web World, Which web server was popular in web site? Apache, nginx, lighttpd? Baidu.com use Apache, and many web sites like 163.com use nginx. Why? Its configuration i...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
355
首先,保证可以ping通
然后执行如下命令,
master登录slave
master上面执行如下指令:
2.4 确认本机sshd的配置文件(root)
$ vi/etc/ssh/sshd_config
找到以下内容,并去掉注释符"#"
RSAAuthenticationyes
PubkeyAuthenticationyes
AuthorizedKeys...
分类:
其他好文 时间:
2014-04-29 13:14:22
阅读次数:
280
习惯了用apache后,当第一次用nginx时,把原来的项目(thinkphp框架)部署在新服务器上的时候,惊呆了!
所有的URL模式下都不能正常运行,甚至连css,js文件都不能正常加载。
原因是ngibx不支持pathinfo
主要是需要配置nginx
location / {
root D:/wnmp/www;
index ind...
分类:
Web程序 时间:
2014-04-29 13:11:20
阅读次数:
680