源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2020-05-05 05:17 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要: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;[b]try_files $uri $uri/ /index.php?$uri&$args;
[/b]  }

  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;
 }
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部