PHP開發(fā)框架kohana3.3.1在nginx下的偽靜態(tài)設置例子
更新時間:2014年07月14日 09:50:08 投稿:junjie
這篇文章主要介紹了PHP開發(fā)框架kohana3.3.1在nginx下的偽靜態(tài)設置例子,kohana曾經是codeigniter框架的衍生版,后來發(fā)展成另一個獨立的PHP5開發(fā)框架,需要的朋友可以參考下
Kohana 是一款純 PHP5 的框架,基于 MVC 模式開發(fā), 它的特點就是高安全性,輕量級代碼,容易使用,并且最新的kohana3支持HMVC模式。以下是在nginx環(huán)境下的kohana偽靜態(tài)配置參考例子:
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; }
相關文章
Nginx服務器中HTTP 301跳轉到帶www的域名的方法
這篇文章主要介紹了Nginx服務器中HTTP 301跳轉到帶www的域名的方法,包括從HTTPS 301提示跳轉等rewrite相關的方法,需要的朋友可以參考下2015-07-07