• nginx挟制使用https访问(http跳转到https)

    日期:

    nginx强制使用https访问(http跳转到https) 需求简介 基于nginx搭建了一个https访问的虚拟主机,监听的域名是test.com,但是很多用户不清楚https和http的区别,会很容易敲成http://test.com,这时会报出404错误,所以我需要做基于test.com域名的http向https的...

  • 使用nginx+mongerl来搭建了rails的生产环境

    日期:

    最近网上有很多人在推荐使用nginx+mongerl来搭建了rails的生产环境,今天研究了一下。 在ubuntu上安装nginx比较简单 sudo apt-get install nginx 就可以了,如果要安装最新的版本可以去nginx的官方网站上去下载。 ubuntu上搭建rails的已经存在ubuntu的源库中...

  • NGiNX HTTP Push Module,Nginx 的扩展模块

    日期:

    NGiNX_HTTP_Push_Module 是一个 Nginx 的扩展模块,它实现了 HTTP Push 和Comet server的功能。HTTP Push 被经常用在网页上主动推的技术,例如一些聊天室啊,更新信息非常频繁的应用场合。 查看代码示例: http://pushmodule.slact.net/js/dumbchat.js Nginx...

  • 搭建https服务

    日期:

    如何搭建https服务? 网站的架构模式一般是nginx+tomcat,本文章搭建的https环境是在nginx上搭建。 1、/opt/nginx-1.0.6/sbin/nginx -V 查看nginx有没有装http_ssl_module模块 ,如果没有装那么需要装一个该模块 2、创建证书 openssl genrsa -des3 -out logi...

  • Nginx本机SSL配置

    日期:

    首先安装nginx sudoapt-getinstallnginx 必须安装SSL模块,nginx官方文档指明不包括在默认配置中,可以通过运行nginx -V来查看是否包含--with-http_ssl_module。 下一步是生成SSL证书,现在可以配置nginx了。 upstreambackend{ server 127.0 . 0.1 : 9000 ;...

  • Nginx:服务器端SSL配置

    日期:

    nginx安装与配置参考:http://hanqunfeng.iteye.com/blog/697696 一、nginx配置 upstreamtomcats_ssl { server 192.168 . 33.10 : 8090 srun_id=tomcat01; server 192.168 . 33.11 : 8090 srun_id=tomcat02; jvm_route$cookie_JSESSIONID|sessionidreverse;...

  • LNMP高并发时502错误解决方法

    日期:

    问题:最近的抢购有点火,到点抢购的时候网站就会出现502错误 顶不住消费者的压力。 之前php-fpm配置: 单个php-fpm实例,使用socket方式,内存8G 静态方式,启动php-fpm进程数300,具体参数如下 listen=/tmp/php-cgi.sock #listen=127.0.0.1:9000 listen.bac...

  • nginx 服务器的各种配制

    日期:

    一,nginx开启gzip压缩 gzip on; //该指令用于开启或关闭gzip模块(on/off) gzip_min_length 1k; //设置允许压缩的页面最小字节数,页面字节数从header头得content-length中进行获...

  • nginx下禁止某些ip访问web服务器的配置

    日期:

    nginx的ngx_http_access_module 模块可以用来设置允许/禁止哪些ip或ip段访问,可以设置一个文件内容类似下面的: denyIP; deny subnet; allowIP; allow subnet; # block all ips deny all; # allow all ips allow all; 其中网段的写法是这样的:192.168.1.0/...

  • nginx+spawn-fcig+fastcgi+c++

    日期:

    我使用nginx+fastcgi+c++,基于web http协议来进行客户端和服务器端的交互,我又两个cgi程序,分别为1.cgi和2.cgi,已经其中,我希望url路径中包含fcgi1.cgi,将请求交给1.cgi,对于2同理. 我的nginx配置 #nginx run on user group user zhou adm; # numbe...