服务器 
首页 > 服务器 > 浏览文章

PHP开发框架kohana3.3.1在nginx下的伪静态设置例子

(编辑:jimmy 日期: 2024/9/21 浏览:3 次 )

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;
	}

上一篇:ubuntu13.10编译安装mono环境(一)
下一篇:IIS8.5 配置错误提示不能在此路径中使用此配置节的解决办法
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。