On my server (Debian 8) is nginx + apache. When I work in the phpMyAdmin panel, I find this in the site logs:

[crit] 12212#0: *216305 connect() to unix:/var/run/php-fpm.www-data.sock failed (2: No such file or directory) while connecting to upstream, client: 123.123.123.25, server: site.com, request: "GET /phpmyadmin/db_structure.php?server=1&db=users&token=3b0dbdca858219ccd7a85cb3f61911b9&ajax_request=true&ajax_page_request=true&menuHashes=6e077c32&_nocache=1464879170462427468 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.www-data.sock:", host: "site.com", referrer:http://site.com/phpmyadmin/index.php?db=... 

Such errors appear only from phpMyAdmin. The strangeness is that on my server there is not and there was never php-fpm. Of course, I tried to install it, but the error did not disappear. I deleted it due to the lack of need for it. I also notice that phpMyAdmin is slower than on the old server where there was no nginx. It turns out that this problem slows down the speed of the panel. Normal type request

 SELECT * FROM `bookmarks` WHERE `id` = 1 

in the panel it takes much longer than a request through php

 mysql_query("SELECT * FROM `bookmarks` WHERE `id` = 1"); 

I do not know which configs / logs are needed, I post the config from nginx

 user www-data; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 2048; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; proxy_max_temp_file_size 0; proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s; client_body_timeout 6m; client_header_timeout 6m; send_timeout 6m; proxy_buffers 16 32k; proxy_buffer_size 32k; client_max_body_size 100m; large_client_header_buffers 8 32k; proxy_temp_file_write_size 64k; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_min_length 10; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-ic$ gzip_vary on; gzip_proxied any; gzip_disable msie6; include /etc/nginx/conf.d/*.conf; include /etc/nginx/vhosts/*/*; server { server_name localhost; disable_symlinks if_not_owner; listen 80; include /etc/nginx/vhosts-includes/*.conf; large_client_header_buffers 8 32k; location @fallback { error_log /dev/null crit; proxy_pass http://127.0.0.1:8080; proxy_redirect http://127.0.0.1:8080 /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; access_log off; proxy_buffer_size 32k; client_max_body_size 32M; client_body_buffer_size 512k; proxy_connect_timeout 90; proxy_send_timeout 180s; proxy_read_timeout 180s; } } } 
  • see phpmyadmin configs: config.inc.php, $ cfg ['Servers'] [$ i] ['socket'], mysql my.cnf [client] section, PHP: php.ini [MySQL] mysql.default_socket - AkaInq
  • one
    judging by the format, these are the nginx logs, which tries to use the php-fpm socket and does not find it. find this address in the configuration to figure it out - etki
  • one
    and what does the grep -rl php-fpm /etc/nginx ? - aleksandr barakin

1 answer 1

Reinstalled php-fpm

In /etc/nginx/vhosts-includes/phpmyadmin-nginx.conf

fastcgi_pass unix:/var/run/php-fpm.www-data.sock; path fastcgi_pass unix:/var/run/php-fpm.www-data.sock; on

 fastcgi_pass unix:/var/run/php5-fpm.sock; 

because php-fpm creates php5-fpm.sock

In afterlogic-nginx.conf (the same directory) there is also an incorrect path to the socket. Corrected.