Nginx on some routes gives 502 error?

There is a site on PHP with the Smarty template engine.

server {
 listen 80 default_server;
 listen [::]:80 default_server;

 root /var/www/html/public_html;

 index index.php index.tpl index.html index.html;
 server_name www.xxx.ru xxx.ru;

 if (!-e $request_filename)
{
 rewrite ^/(.*)$ /index.php?/$1 last;
break;
}


 location ~ \.php$ 
{
 include snippets/fastcgi-php.conf;
 location unix:/var/run/php/php5.6-fpm.sock;
 } 
}

https://xxx.ru/13402-sabelqnaja-pila-hilti these links are not working And such work
https://xxx.ru/rossiya/1-benzokosy-trimmery
April 19th 20 at 11:59
1 answer
April 19th 20 at 12:01
Remove nginx from tags, add PHP five hundredth errors are errors of the backend, to a web server, it is the relationship usually does not have.

In General - see error logs, first nginx, then PHP. If no errors are logged - make to started.

Find more questions by tags Nginx