Nginx Configuration for Chevereto Pseudo-Static Rules

6,263 0

Chevereto is currently the most powerful PHP image hosting system. It can be used to deploy public or private image storage services for multiple users. Chevereto now has a free version, so you may want to take a look: https://github.com/Chevereto/Chevereto-Free

Chevereto provides pseudo-static rules for Apache environments by default. If your server uses Nginx, you can use the following pseudo-static rules:

Nginx
location / {
    if (-f $request_filename/index.html){
        rewrite (.*) $1/index.html break;
    }
    if (-f $request_filename/index.php){
        rewrite (.*) $1/index.php;
    }
    if (!-f $request_filename){
        rewrite (.*) /index.php;
    }
    try_files $uri $uri/ /api.php;
}
location /admin {
    try_files $uri /admin/index.php?$args;
}

Comments

(0)

No comments yet. Start the conversation.

Leave a comment

© 2026 Carefree. All rights reserved.

Carefree is a personal site about technology and everyday life, documenting web development, backend, and DevOps practices, plus software tools, digital experiences, and thoughts beyond code.