ngixへのインストール時の設定

2012年6月28日 at 3:49

ご参考までに貼っときます。

server {
listen 80;
server_name test.localhttp://www.test.local;
root /var/www/nginx/html;
location / {
index index.php;
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ \.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

タグ: