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;
}
}

本文介绍了一种针对Kohana框架的Nginx服务器配置方案。配置内容包括监听端口设置、错误日志记录、URL重写规则以及PHP文件通过FastCGI方式处理等关键细节。
2059

被折叠的 条评论
为什么被折叠?



