php配置 php-cgi.sock使用

PHP配置文件:php

[global]
pid = /run/php-fpm/php-fpm.pid
error_log = /var/log/php-fpm/php-fpm.log
log_level = notice
[www] nginx

listen = /dev/shm/php-cgi.sockphp-fpm

listen.backlog = -1unix

listen.allowed_clients = 127.0.0.1ip

listen.owner = www
listen.group = www
listen.mode = 0666io

user = wwwast

group = wwwcli

 

nginx配置配置

location ~ .*\.(php|php5)?$
{
  fastcgi_pass unix:/dev/shm/php-cgi.sock;
  #fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  include fastcgi.conf;
}cgi

相關文章
相關標籤/搜索