分类
使用笔记

Chevereto Nginx重写规则

nginx服务器需要先设置好重写规则,才能安装,否则下载好安装包,安装路径会显示404

重写规则:

# Context limits
client_max_body_size 20M;

# Disable access to sensitive files
location ~* (app|content|lib)/.*\.(po|php|lock|sql)$ {
    deny all;
}

# Image not found replacement
location ~ \.(jpe?g|png|gif|webp)$ {
    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 / {
    index index.php;
    try_files $uri $uri/ /index.php$is_args$query_string;
}

https://v3-docs.chevereto.com/setup/requirements.html#nginx-url-rewriting

Chevereto程序下载:https://download.fastgit.org/Chevereto/Chevereto-Free/archive/1.3.0.zip