几经折腾,终于把Typecho架上来了, 主要还是在于Nginx的配置上, 赶紧贴出来,用于留存。
$ sudo vim /etc/nginx/sites-available/default
location ~ .*\.php(\/.*)*$ { include fastcgi_params; fastcgi_index index.php; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_pass unix:/var/run/php5-fpm.sock; }
另外
网站的usr
要开启读写权限
# sudo chmod 666 -R usr # sudo chmod 777 -R `find usr -type d`