search

Home  >  Q&A  >  body text

nginx - Which should I use between php-fpm.sock and php-cgi.sock?

When configuring PHP monitoring, I saw two ways of writing:
One is:

listen = /dev/shm/php-fpm.sock

Another one is:

listen = /dev/shm/php-cgi.sock

That is, php-fpm.sock and php-cgi.sock, which one is better? The php version is 7.0.

伊谢尔伦伊谢尔伦2753 days ago858

reply all(2)I'll reply

  • 黄舟

    黄舟2017-05-16 17:20:02

    Use whichever one you match, if you are using ngnix + fastcgi,那就用php-cgi.sock;如果是ngnix + php-fpm,那就用php-fpm.sock。当然,fpm的效率要比fastcgi高,因为fpm就是一个fastcgi’s manager.

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 17:20:02

    It doesn’t matter what the file name is

    reply
    0
  • Cancelreply