Install php5.6 on yum on centos7 {code ...} modify {code ...} create php-fcgi.sock file {code ...} restart php-fpm {code ...} but the devshmphp-fcgi.sock is still a common file, not a socket file, view log no error, how to solve? Install php 5.6 on yum on centos7
vim /etc/php-fpm.d/www.conf
Modify
;listen = 127.0.0.1:9000listen=/dev/shm/php-fcgi.sock
Createphp-fcgi.sock
File
touch listen=/dev/shm/php-fcgi.sockchmod 777 /dev/shm/php-fcgi.sock
Restart php-fpm
systemctl restart php-fpm
However/dev/shm/php-fcgi.sock
Or a common file, not a socket file. check the log and there is no error. how can this problem be solved?
Reply content:
Install php 5.6 on yum on centos7
vim /etc/php-fpm.d/www.conf
Modify
;listen = 127.0.0.1:9000listen=/dev/shm/php-fcgi.sock
Createphp-fcgi.sock
File
touch listen=/dev/shm/php-fcgi.sockchmod 777 /dev/shm/php-fcgi.sock
Restart php-fpm
systemctl restart php-fpm
However/dev/shm/php-fcgi.sock
Or a common file, not a socket file. check the log and there is no error. how can this problem be solved?
Delete a common file. when running in Unix Socket mode, the sock file is created by php-fpm.
Isn't the configuration file written? php-fpm will generate this socket file by itself and be referenced by the master process
; The address on which to accept FastCGI requests.; Valid syntaxes are:; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on; a specific port;; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on; a specific port;; 'port' - to listen on a TCP socket to all IPv4 addresses on a; specific port;; '[::]:port' - to listen on a TCP socket to all addresses; (IPv6 and IPv4-mapped) on a specific port;; '/path/to/unix/socket' - to listen on a unix socket.
I think the configuration is wrong.
Php-fpm.conf
listen = /dev/shm/php-fcgi.socklisten.owner = wwwlisten.group = wwwlisten.mode = 0660
Nginx. conf
fastcgi_pass unix:/dev/shm/php-fcgi.sock;