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

2019/7/10 21:08:09

本文主要是介绍PHP开发框架kohana3.3.1在nginx下的伪静态设置例子,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

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



这篇关于PHP开发框架kohana3.3.1在nginx下的伪静态设置例子的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程