• Nginx使用教程(七):使用Nginx缓存之proxy cache

    日期:

    定义缓存目录 使用您喜欢的文本编辑器打开/etc/nginx/nginx.conf,并在http {区域加入: proxy_cache_path /var/www/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m; proxy_temp_path /var/www/cache/tmp; real_ip_header X-Forwarde...

  • Nginx使用教程(八):使用Nginx缓存之Memcached缓存

    日期:

    使用Memcache Memcache是一个通用的内存缓存系统。 它通常用于加速缓慢的数据访问。 NGINX memcached模块提供各种指令,可以配置为直接访问Memcache提供内容,从而避免对上游服务器的请求。 除了指令之外,模块还创建$ memcached_key变量,用于执行高速缓存...

  • Nginx 反向代理https

    日期:

    说明: 1.nginx 1.2.0 centos 6.2 2.这里所指的反向代理https是指nginx为ssl服务器,nginx与后端服务器的通信还是http,当然可能也可以实现nginx与后端服务器实现https通信,不过本文没有测试 步骤: nginx要实现ssl,在编译时要添加--with-http_ssl_module,...

  • 3种Nginx防盗链的方法

    日期:

    一:一般的防盗链如下: location ~* \.(gif|jpg|png|swf|flv)$ { valid_referers none blocked www.deepvps.comdeepvps.com ; if ($invalid_referer) { rewrite ^/ http://www.deepvps.com/retrun.html; #return 403; } } 第一行:gif|jpg|png|swf|flv 表示...

  • Linux下Nginx+Tomcat整合的安装与配置

    日期:

    一、安装Tomcat和JDK 1、上传apache-tomcat-6.0.18.tar.gz和jdk-6u12-linux-i586.bin至/usr/local 2、执行如下命令安装tomcat: #cd /usr/local #tar zxvf apache-tomcat- 6.0 . 18 .tar.gz 解压完成后将apache-tomcat-6.0.18重命名为tomcat 3、执行如下命令...

  • Centos7.2 源码安装Nginx

    日期:

    近期准备使用Nginx,就着手研究一下在CentOS7上来源码安装Nginx。话不多说(主要是怕忘了呵呵)开始正题。 #uname-r 3.10.0-327.el7.x86_64 #./configure--prefix=/usr/local/nginx 安装前还是在网上稍微搜集了一些信息,我的CentOS安装在虚拟机上,安装的时...

  • win7系统下安装、配置、测试nginx

    日期:

    1.nginx.org 下载nginx的稳定版zip包。 2.解压至本地目录如D:\nginx(主)。 功能: 1. cd到D:\nginx目录 2. 启动nginx: nginx -c conf\nginx.conf 3. nginx.conf 关键配置文件如下: upstreamwww.wu.com{ serverlocalhost:8090weight=3; serverlocalhost:90...

  • nginx的常用命令

    日期:

    Starting,Stopping,andReloadingConfiguration Tostartnginx,runtheexecutablefile.Oncenginxisstarted,itcanbecontrolledbyinvokingtheexecutablewiththe-sparameter.Usethefollowingsyntax: nginx-ssignal Wheresignalmaybeoneofthefollowing: stopfastshu...

  • nginx配置文件nginx.conf解读

    日期:

    server { listen 8080; root /data/up1; location / { }} This will be a simple server that listens on the port 8080 (previously, the listen directive has not been specified since the standard port 80 was used) and maps all requests to the /da...

  • nginx做负载均衡,怎么在有宕机情况出现时保证网站的响应速度

    日期:

    基础知识: 1. nginx做负载均衡时,默认每台服务器的权重相等。 2. 如果要给某台服务器加权重,则通过下面的方式 upstreamwww.wu.com{ serverlocalhost:8084weight=3; server10.10.105.149:8080weight=1; } 3. 健康监测机制: nginx会根据预先设置的权重转发...