kohana框架nginx配置整理
vim nginx.conf
server {
listen 80;
server_name qipa250.kohana.com;
error_log /var/log/nginx/qipa250.kohana.com-error.log;
rewrite_log on;
# access_log logs/host.access.log main;
root /var/www/kohana-san;
rewrite ^/(.*)/index.html$ $1/index.php last;
location / {
index index.php index.html index.htm;
}
location = /50x.html {
root html;
}
location ~ \.php$ {
root /var/www/kohana-san;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
}