douguyi3903 2016-05-24 09:46
浏览 99
已采纳

找不到nginx + php5-fpm.sock

I have several subdomains, each with a socket:

In /etc/php5/fpm/pool.d/album.conf ::

user = album
group = album
listen = /var/run/php5-fpm-album.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

In /etc/php5/fpm/pool.d/www.conf ::

user = www-data
group = www-data
listen = /var/run/php5-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

In /etc/nginx/nginx.conf ::

upstream php5-fpm-album-sock {
    server unix:/var/run/php5-fpm-album.sock;
}

server {
            ## Escucha en el puerto 80 (HTTP)
            listen 80;

            ## Raíz donde se encuentra la página Web
            root /srv/www/album/;

            ## Orden de prioridad de los archivos index
            index index.php index.html index.htm;

            server_name album.bichomen.com;
            access_log /srv/www/album/access.log;

                location ~ \.php$ {
                   root /srv/www/album;
                   try_files $uri =404;
                   fastcgi_split_path_info ^(.+\.php)(/.+)$;
                   fastcgi_pass php5-fpm-album-sock;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME 
                   $document_root$fastcgi_script_name;
                   include fastcgi_params;
            }
    }

The problem is to disbelieve the socket in /var/run/

Error in nginx.log:

1 connect() to unix:/var/run/php5-fpm-album.sock failed 
(2: No such file or directory)

Where is the problem? Thank you.

  • 写回答

3条回答 默认 最新

  • douyi4912 2017-06-08 06:59
    关注

    At the end restart the server and it works.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 100小时学会sap 书上pp章节5.22,标准成本计算逻辑?
  • ¥50 达梦数据库误删日志文件重做DAMENG01.log启动仍然-712错误
  • ¥15 cellranger化学处理类型报错
  • ¥15 用texstudio插入图片出现下面情况,怎么办
  • ¥15 ubantu 用samba挂载windows的共享文件夹,无法挂载二级目录和修改文件
  • ¥15 有没有会五轴RTCP算法,双转台AC结构。
  • ¥25 对于LSTM实践问题的疑问
  • ¥15 PHP中关于排名和显示的问题
  • ¥15 如何将robotstudio中编辑好的程序通过u盘传输到abb机器人的示教器中
  • ¥15 杰里69芯片 关于HID 配置和实现功能的问题