您正在查看 "Nginx" 分类下的文章
2009-02-07 12:56
要使用Nginx下的泛域名支持,必须在编译 Nginx的时候加上
--with-http_sub_module
freebsd下ports安装的时候有提示的,选上即可。
方法我google了半天,网上的好多我照做都是不行的,例如这个:
listen 80;
server_name www.yourdomain.com *.yourdomain.com;
这个会提示:
# nginx -t
2009/01/04 13:22:56 [emerg] 63944#0: conflicting parameter "*.bsdlov |
2008-08-24 15:19
Say you want to run https port on nginx using a self signed SSL Certificate, this article summarized the steps. First we create the SSL Key, CSR (Certificate Signing Request) and CRT (SSL Certificate) and Configure nginx to answer the request from SSL port.
These are the original articles;
http://rubyjudo.com/ |
2008-08-12 08:43
使用NginxHttpUpstreamRequestHashModule的方式,增加或减少机器时所引起的hash全部错乱的问题还是很令人担心,所以经过一段时间细致思考,觉得由自己手工制定并实现url hash规则,然后利用nginx的location标签或if语法来实现来得更为灵活,可操作性和可用性会大大加强。不过配置就稍显复杂了,也需要程序方面的支持。
使用这种环境,主要需要考虑链接形式,链接形式不能够是/xxx.jsp?id=1这样的带有?的,否则处理起来会很复杂,需要使用rewrite将这种形式的url变化成/1/1.html,其中加一级目录的目的是可以利用到locatio |
2008-08-08 16:17
服务器的大用户量的承载方案
一、前言
二、编译安装
三、 安装MySQL、memcache
四、 安装Apache、PHP、eAccelerator、php-memcache
五、 安装Squid
六、后记
一、前言,准备工作
当前,LAMP开发模式是WEB开发的首选,如何搭建一个高效、可靠、稳定的WEB服务器一直是个热门主题,本文就是这个主题的一次尝试。
我们采用的架构图如下:
引用-------- ---------- |
2008-08-08 16:14
Nginx上的Memcached应用改进
由于nginx的memcached module不支持压缩, 直接缓存页面, 非常浪费内存.
实验了2个方案:
1. 直接将压缩的数据输出,并添加一个header:Content-Encoding:deflate
按说这是效率最高的,不过,很遗憾,Safari和FF都可以正常显示页面,但是**** IE, 只能显示空白页面.
2. 取消PECL内置的COMPRESS, 手动使用PHP的gzcompress函数进行压缩,这样,nginx可以通过添加header,
直接输出memcached的内容,由浏览器自行解压.
缺点: 对于不支持gzip的客户端,将无法正确获得内容. 因此,最好还是 |
2008-08-08 15:36
Memcached,就不多说了,地球人都知道.
Nginx有一个memcached_module,可以直接从后端的memached服务器中读取内容,
直接输出.
通过这个模块,可以极大的提升动态页面的访问速度.
我的实践中, 曾经用这个模块快速的解决了由于代码造成的一些瓶颈问题.
memcached可以通过upstream来从多台memcached服务器中读取,也可以支持热备份.
下面是我的完整例子
upstream memcached {
server 192.168.8.11:11211;
server 192.168.8.10:11211;
}
server {
listen 80; |
2008-08-08 14:20
nginx配置说明----------------------------
#运行用户
user nobody nobody;
#启动进程
worker_processes 2;
#全局错误日志及PID文档
error_log logs/error.log notice;
pid | |
2008-08-08 14:19
http://www.igvita.com/2008/02/11/nginx-and-me | |
2008-08-08 14:17
2008-08-06 21:07
Nginx already in my list for almost 3 month but I don’t have time for play around with it. As usual freebsd ports is my preferable method to install software in FreeBSD
I’m lucky to get php-fpm ports from php-fpm site that work for php-5.2.3RC. After change it a bit for php 5.2.6 I can test it together with nginx stable from ports too.
Here |
|
|