之前在RTMP流媒体服务端应用开发系列 – Nginx-Rtmp鉴权设置这篇中介绍了Nginx-Rtmp服务器通过on_play和on_publish事件回调到http服务上,再用ngx_http_secure_link_module进行鉴权.

今天介绍一种原生的方式

注:只在博主编译的Nginx-Rtmp-Win32版本中有此功能
下载https://github.com/illuspas/nginx-rtmp-win32/archive/master.zip版本

首先配置nginx.conf

继续阅读

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: RTMP流媒体服务端应用开发系列 – Nginx-Rtmp-Win32仿星域CDN鉴权配置

joomla 在Niginx下的rewrite规则很简单,主要就是红色部分
如果出现502错误,请参看前一篇介绍
server {
  server_name www.xxx.com;
  root /home/xxx/www/www.xxx.com;
  index index.php index.html;
 
  location / {
    try_files $uri $uri/ /index.php?q=$request_uri;
  }
 
  location ~ .php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: Joomla Nginx rewrite

今天装完joomla,能进后台,但是前台一直报502 Bad Gateway错误,网上搜索后找到解决办法,是由于Nginx中FastCGI buffer不够,这是张宴前辈的配置
修改nginx.conf,添加如下fastcgi设置
http {

  ********

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
  *******
}

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: 解决由FastCGI Buffer不够引起的Joomla 在Nginx下出现 502 Bad Gateway 错误

kohana官方手册中的规则有点小问题,这是我测试通过的规则

红色的地方是特别注意的地方,要求nginx版本> 0.7.31

debian 5 现在的Nginx才在0.6.x  之前试了很久都出错

现在使用

Dotdeb的 php5.3 php5-fpm php5-cgi

debian 6 中的 nginx 0.7.67

server {
    server_name  golebo.com;
    root   /home/xxxx/www/golebo.com;

    location / {
        index  index.html index.htm index.php default.php;
        try_files $uri $uri/ /index.php$uri?$args;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
    location ~ ^(.+.php)(.*)$ {
        fastcgi_split_path_info ^(.+.php)(.*)$;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  PATH_INFO          $fastcgi_path_info;
        include        fastcgi_params;
    }
}

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: Kohana v3 Nginx rewrite 规则

location / {
        index  index.html index.htm index.php;

        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        }

    }

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: typecho Nginx rewrite 规则

安装mysql

apt-get install mysql-server

安装php

apt-get install php5-common php5-cgi php5-mysql php5-curl php5-gd php5-imagick php5-mcrypt  php5-sqlite php-apc

安装Nginx

apt-get install nginx

安装spawn-fcgi

$wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
$tar -xvf spawn-fcgi-1.6.3.tar.gz
$cd spawn-fcgi-1.6.3
$./configure –prefix=/usr
$make

$sudo make install

启动php5-cgi
$spawn-fcgi -a 127.0.0.1 -p 9000  -u www-data -g www-data -f /usr/bin/php5-cgi

配置Nginx

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: Debian5 安装Nginx+php(spawn-fcgi) + Mysql