1、打开终端连接至centos服务器。

2、打开nginx的安装目录。

3、找到之前blog的配置文件。

4、将blog的配置文件做如下修改。

5、检查语法,并且重启nginx。条目如下:
server {
listen 80;
server_name blog.test111.com;
location / {
root html/blog;
index index.html index.htm;
}
location ~ .*\.(php|php5)?$ {
root html/blog;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include fastcgi.conf;
}
}

6、完美解决。
