• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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

Nginx working Rewrite Rules

It works:
Code:
user www;
worker_processes 1;

events {
        worker_connections 1024;
}

http {
        include mime.types;
        default_type application/octet-stream;

        client_body_in_file_only clean;
        client_body_temp_path /var/tmp/nginx/client_body_temp 1 2;
        client_max_body_size 0;
        root /usr/local/www/data;

        server {
                server_name example.com;
                location / {
                        index index.php index.html index.htm;
                        try_files $uri $uri/ /index.php?$args;
                }

                location ~ \.(bmp|gif|jpe?g|png)$ {
                        try_files $uri /content/system/null.gif;
                }

                location ~ (^/app/(.*)\.php$|^/lib/G) {
                        internal;
                        return 404;
                }

                location ~ (\.htaccess$|\.svn) {
                        internal;
                        return 404;
                }

                location ~ \.php$ {
                        expires off;
                        try_files $fastcgi_script_name =404;
                        fastcgi_pass unix:/var/run/php-fpm.socket;
                        fastcgi_pass_request_body off;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_param REQUEST_BODY_FILE $request_body_file;
                        include fastcgi_params;
                }
        }

        server {
                server_name www.example.com;
                return 301 http://example.com$request_uri;
        }
}
 
Guys could you help me please to setup workable nginx rewrite rules config?
I got in my panel a function to convert htaccess to nginx, and this is what i get after i convert it:

Code:
# ServerSignature Off
# Options -Indexes
# Options -MultiViews
# Options +FollowSymLinks
if (!-f $request_filename) {
    # RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
}
if (!-e $request_filename) {
    set $pnlx_rules_2 1$pnlx_rules_2;
}
if ($uri !~* "\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$") {
    set $pnlx_rules_2 2$pnlx_rules_2;
    set $pnlx_val_1 $1;
}
if ($pnlx_rules_2 = "12") {
    rewrite . /index.php last;
}
And still its not working, do i need to change the .htaccess file 2 in the websites dir with this rules too?
 
Back
Top