PHP开发框架kohana3.3.1在nginx下的伪静态设置例子
更新时间:2014年07月14日 09:50:08 投稿:junjie
这篇文章主要介绍了PHP开发框架kohana3.3.1在nginx下的伪静态设置例子,kohana曾经是codeigniter框架的衍生版,后来发展成另一个独立的PHP5开发框架,需要的朋友可以参考下
Kohana 是一款纯 PHP5 的框架,基于 MVC 模式开发, 它的特点就是高安全性,轻量级代码,容易使用,并且最新的kohana3支持HMVC模式。以下是在nginx环境下的kohana伪静态配置参考例子:
server
{
listen 80;
server_name 55zaza;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/55zaza;
#include kohana_rw.conf;
location / {
index index.php;
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
相关文章
解析prometheus+grafana监控nginx的方法
在prometheus需要向ngxin中打入探针,通过探针获取ngxin信息,并通过接口输出。下文将讲述如何监控ngxin,感兴趣的朋友跟随小编一起看看吧2021-11-11
开启Nginx时端口被占用提示:Address already in use
这篇文章主要介绍了开启Nginx时端口被占用提示:Address already in use的解决方法,文中通过两种方法给大家介绍了Nginx的启动、停止与重启 的操作方法 ,需要的朋友可以参考下2018-09-09


最新评论