Chevereto Nginx 伪静态Rewrite规则

本文阅读 1 分钟
首页 技术教程 正文

Chevereto 是目前最为强大的 PHP 图床系统,通过它可部署多用户公开或私有的图片存储服务,现在 Chevereto 出了免费的版本,小伙伴可以围观一下。

https://github.com/Chevereto/Chevereto-Free

Chevereto 默认提供基于 Apache 环境的伪静态规则,如果服务器是 Nginx 则需要设置以下Rewrite 伪静态规则:

# Image not found replacement
location ~* (jpe?g|png|gif) {
        log_not_found off;
        error_page 404 /content/images/system/default/404.gif;
}

# CORS header (avoids font rendering issues)
location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
        add_header Access-Control-Allow-Origin "*";
}

# Pretty URLs
location / {
        try_files $uri $uri/ /index.php?$query_string;
}
location /admin {
    try_files $uri /admin/index.php?$args;
}
本文来自投稿,不代表本站立场,如若转载,请注明出处:http://www.cnmini.net/index.php/archives/165/
OpenVZ 平台 centos6-64 Google BBR 一键安装脚本
« 上一篇 03-01
搭建Kangle+EasyPane 一键安装脚本
下一篇 » 03-02

发表评论

成为第一个评论的人