• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Need NginX rule for rewrite

Logan

Chevereto Member
Hi all.
I am looking for some webserver rule to re-write the main Image Direct URL to the website Image link

main Image

website Image link

So while clicking or opening the main image we should redirect to the website image link.

WebServer- Nginx
OS Ubuntu- 20.04
MySql- 8.0.24

Thanks
and Regards
Logan
 
PHP:
 # Disable access to sensitive application files
    location ~* (app|content|lib)/.*\.(po|php|lock|sql)$ {
        return 404;
    }
    location ~* composer\.json|composer\.lock|.gitignore$ {
        return 404;
    }
    location ~* /\.ht {
        return 404;
    }

    # 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 "*";
    }

    # PHP front controller
    location / {
        index index.php;
        try_files $uri $uri/ /index.php$is_args$query_string;
    }

    # Single PHP-entrypoint (disables direct access to .php files)
    location ~* \.php$  {
        internal;
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    }

This does not seem to work in Plesk Web Server, need more help please and thank you.
 
@user_a253f These are for VPS targeting PHP 8.1, perhaps you may need some tweaking. What does the server error log reports?
 
@user_a253f

These are the default general purpose Nginx rules, it is understood that there may be use cases where it requires editing, specially here:

Code:
    location ~* \.php$  {
        internal;
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    }

In most Nginx distributions the above should work "as-is", but the location of the socket unix:/var/run/php/php8.1-fpm.sock may be different and it could need tweaking. Also, it requires working PHP-FPM.
 
Back
Top