ログに表示されるエラーは次のとおりです。
2012-08-22 17:20:35 --- ERROR: HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: index.php ~ SYSPATH/classes/kohana/request.php [ 1126 ]
2012-08-22 17:20:35 --- STRACE: HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: index.php ~ SYSPATH/classes/kohana/request.php [ 1126 ]
--
#0 /var/www/index.php(109): Kohana_Request->execute()
#1 {main}
これが私のnginx設定です:
server {
listen 80;
server_name 000.000.00.00;
root /var/www;
index index.php;
location / {
try_files $uri $uri/ @kohana;
}
location ~ /\. {
deny all;
}
location ~* \.php$ {
try_files $uri $uri/ @kohana;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
location @kohana {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
フロントページで私は得る:
HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: index.php
と
DOCROOT/index.php [ 109 ] » Kohana_Request->execute()
助けてくれてありがとう!
アップデート
Kohana::init(array(
'base_url' => '/',
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));