nginx 配置 getsimplecms 配置文件

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


Thread Modes
Nginx, GetSimple CMS and preety urls, too.

posted @   码不能停  阅读(352)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
点击右上角即可分享
微信分享提示