E
E
egor_spk2015-09-09 21:56:00
Nginx
egor_spk, 2015-09-09 21:56:00

Why are internal UMI pages not available on nginx server?

Went into a bit of a rut.
If you navigate through the pages of the site, they open, but if you try to open a specific link, then 404 is displayed. And sometimes it may open, or it may not open. Search bots, as I understand it, get just a 404 error.
Used UMI 2.7 + nginx + php-fpm.
Here is the nginx config:

server {
        listen 80;

        root /var/www/co/;
        index index.php;

        server_name geberit24.ru www.geberit24.ru;

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }


        location ~* \/\.ht {
                deny all;
        }
        location ~* ^\/(classes|errors\/logs|sys\-temp|cache|xmldb|static|packages) {
                deny all;
        }

        location ~* (\/for_del_connector\.php|\.ini|\.conf)$ {
                deny all;
        }
        location ~* ^(\/files\/) {
                try_files $uri =404;
        }
        location ~* ^(\/images\/) {
                access_log off;
                expires 7d;
                add_header Pragma public;
                add_header Cache-Control "public";
                try_files $uri =404;
        }

        location ~* ^\/images\/autothumbs\/ {
                try_files $uri @autothumbs =404;
        }

        location @autothumbs {
                rewrite ^\/images\/autothumbs\/(.*)$ /autothumbs.php?img=$1$query_string last;
        }
        location @clean_url {
                rewrite ^/(.*)$ /index.php?path=$1 last;
        }
        location @dynamic {
                try_files $uri @clean_url;
        }
        location / {
                rewrite ^\/robots\.txt /sbots.php?path=$1 last;
                rewrite ^\/sitemap\.xml /sitemap.php last;
                rewrite ^\/\~\/([0-9]+)$ /tinyurl.php?id=$1 last;
                rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
                rewrite ^\/(.*)\.xml$ /index.php?xmlMode=force&path=$1 last;
                rewrite ^(.*)\.json$ /index.php?jsonMode=force&path=$1 last;
                if ($cookie_umicms_session) {
                        error_page 412 = @dynamic;
                        return 412;
                }
                if ($request_method = 'POST') {
                        error_page 412 = @dynamic;
                        return 412;
                }
        }
        location ~* \.js$ {
                rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
                try_files $uri =404;
                expires 7d;
                add_header Pragma public;
                add_header Cache-Control "public";
        }
        location ~* \.(ico|jpg|pdf|jpeg|png|gif|swf|css)$ {
                access_log off;
                expires 7d;
                add_header Pragma public;
                add_header Cache-Control "public";
                try_files $uri =404;
        }
}

curl -I http://geberit24.ru/katalog/unitaz-bide/kryshka-bide/kryshka-bide_geberit_aquaclean_5000plus/

HTTP/1.1 404 Not Found
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 09 Sep 2015 18:53:39 GMT
Content-Type: text/html
Content-Length: 177
Connection: keep-alive

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question