欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

yaf 配置

程序员文章站 2024-02-15 19:17:47
...


nginx 配置

server
     {
         listen          80;
         server_name     yaf;
         autoindex on;
         index   index.html  index.htm  index.php;
         root    /data/www/yaf;
 
         if (!-e $request_filename)
         {
                 rewrite ^/(.*) /index.php/$1 last;
         }
 
         location ~ .*
         {
             fastcgi_pass   127.0.0.1:9001;
             fastcgi_index  index.php;
             include fcgi.conf;
         }
     }


index.php

define('APP_PATH', dirname(__FILE__));

$app = new Yaf_Application( APP_PATH . "/conf/app.ini");

$app->bootstrap()->run();

conf/app.ini

[common]
application.directory = APP_PATH  "/app"
application.dispatcher.catchException = 1
application.dispatcher.throwException = 1
application.view.ext = 'html'
[product : common]



转载于:https://my.oschina.net/vshida/blog/88385