php配置 php-cgi.sock使用

php配置 php-cgi.sock使用

PHP配置文件:

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

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

listen.backlog = -1

listen.allowed_clients = 127.0.0.1

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

user = www

group = www

 

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;
}

转载地址:https://www.cnblogs.com/cocoqi/p/7884201.html

你可能感兴趣的:(PHP,linux)