CakePHPをnginx+php5-fpmでrewrite ruleを設定する

設定コード:
server {
listen 80;
server_name www.arkgame.com;
root /data/site/www.arkgame.com;
index index.php;
access_log /data/logs/nginx/www.arkgame.com_accerss.log;
error_log /data/logs/nginx/www.arkgame.com_error.log;
# main cakephp rewrite rule
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ .php$ {
root /data/site/www.arkgame.com;
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock; # 対応したFastCGIを変更
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}

Server

Posted by arkgame