一叶程序设计小站

server { listen 80;

↓此处请配置你自己的域名

server_name  blog.make3.cn;

charset      utf-8;

#    access_log  /var/log/nginx/phalcon/access.log  main;
# ↓此处请更改为你自己的服务器的绝对路径 
set $root_path '/home/blog';
root $root_path;
#try_files $uri $uri/ @rewrite;
index index.php index.html;
location / {

    try_files $uri $uri/ /index.php?$query_string;
}

location ~ \.php$ {
    fastcgi_index  index.php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
    root $root_path;
}

}

参考:

wiki.iminho.me/docs/show/9


                       Bill Zhang
                         Thanks

评论
评论
BILL ZHANG

BILL ZHANG

管理员

热门文章

友情链接

一叶程序设计小站

有事扫我↓↓

一叶程序设计小站