开心园地

导航

YII 在 nginx1.3.x版本下的安装配置

1)主文件

  location / {

    root /opt/webroot;
index index.html index.htm index.php
if (!-e $request_filename){
rewrite ^/(.*) /yiiGuestBook/index.php last;
}
}

        location ~ \.php$ {
            root           /opt/webroot/;
            fastcgi_pass   127.0.0.1:9001;
            fastcgi_index  index.php;
            fastcgi_param  YII_ENVIRONMENT "STAGING";
            fastcgi_param  SCRIPT_FILENAME  /opt/webroot/$fastcgi_script_name;
            include        fastcgi_params;
        }
    }

2) 修改 runtime目录权限:

chmod -cR 777 /opt/webroot/yiiGuestBook/protected/runtime

3)打开Php的pdo.mysql扩展.

posted on 2012-11-07 16:57  开心园地  阅读(481)  评论(0编辑  收藏  举报