The PHP-FPM cannot generate the. sock file

Source: Internet
Author: User
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.sockFile

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.sockOr 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.sockFile

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.sockOr 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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.