getsimplecms的安装需要两个php类库,一个是dom操作,一个是gd library.
所以先安装这两个类库,重启php解释器。
yum install php-xml;
yum install gd gd-devel php-gd;
service php-fpm restart;
服务器配置文件如下:
server {
listen 80;
#TODO: make www to redirect!
server_name test.com;
access_log /var/log/nginx/test.com.access.log;
error_log /var/log/nginx/test.com.error.log;
location / {
root /var/www/test.com;
index index.html index.htm index.php;
# this serves static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
# this sends all non-existing file or directory requests to index.php
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?id=$1 last;
}
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/test.com$fastcgi_script_name;
}
}