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 有没有复现过PFENet的,如何解决?
  • ¥15 FDMA,OFDMA,TDMA 和 CDMA 系统容量对比仿真
  • ¥15 图神经网络的入侵检测
  • ¥15 工业数据采集技术+存储架构推荐
  • ¥15 GPT-SOVITS如何训练少数民族语言支持合成语音
  • ¥20 树莓派4b使用Camera Module 3时出现the system should be configured for the legacy camera stack问题
  • ¥200 GitHub开源程序配置在VScode调试
  • ¥15 爬虫保存的scv文件0kb
  • ¥20 如何实现基于强化学习的带电作业机械臂的运动规划与控制
  • ¥15 使用wpf制作打砖块游戏时遇到的一个Bug