Kohana 是一款纯 PHP5 的框架,基于 MVC 模式开发, 它的特点就是高安全性,轻量级代码,容易使用,并且最新的kohana3支持HMVC模式。以下是在nginx环境下的kohana伪静态配置参考例子:
01server
02{
03listen 80;
04server_name 55zaza;
06root /home/wwwroot/55zaza;
07
08#include kohana_rw.conf;
09
10location / {
11index index.php;
12<strong>try_files $uri $uri/ /index.php?$uri&$args;
13</strong> }
14
15location ~ .*\.(php|php5)?$
16{
17try_files $uri =404;
18fastcgi_pass unix:/tmp/php-cgi.sock;
19fastcgi_index index.php;
20include fcgi.conf;
21}
22
23location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
24{
25expires 30d;
26}
27
28location ~ .*\.(js|css)?$
29{
30expires 12h;
31}
32access_log off;
33}