nginx + php5-fpm.sock is not found
我有几个子域,每个子域都有一个套接字:
在 /etc/php5/fpm/pool.d/album.conf ::
1
2 3 4 5 6 7 8 9 10 11 12 13 14 |
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 = / |
在 /etc/php5/fpm/pool.d/www.conf ::
1
2 3 4 5 6 |
user = www–data
group = www–data listen = /var/run/php5–fpm.sock listen.owner = www–data listen.group = www–data listen.mode = 0660 |
在 /etc/nginx/nginx.conf ::
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
upstream php5–fpm–album–sock { server unix:/var/run/php5–fpm–album.sock; } server { ## Ra?-z donde se encuentra la p??gina Web ## Orden de prioridad de los archivos index server_name album.bichomen.com; location ~ //.php$ { |
问题是不相信 /var/run/
中的套接字
nginx.log 中的错误:
1
2 |
问题出在哪里?谢谢。
最后重启服务器就可以了。
ls -lah /var/run
1
|
lrwxrwxrwx 1 root root 4 Feb 28 2015 /var/run -> /run
|
我已经创建了目录 php5-fpm:
1
|
drwxrwxr–x 2 www–data www–data 40 May 24 14:52 php5–fpm
|
?我已经修改了配置文件:
1
|
unix server: /var/run/php5–fpm/album.sock;
|
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/php/268544.html