Nginx笔记总结四:Nginx连接PHP5.4

location ~ .*\.(php)?${

  expires -ls;

  try_file $uri=404;

  fastcgi_split_path_info ~(.+\.php)(/.+)$;

  include fastcgi_params;

  fastcgi_param PATH_INFO $fastcgi_path_info;

  fastcgi_index index.php;

  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

  fastcgi_pass 127.0.0.1:9000;

  #fastcgi_pass unix:/var/run/phpfpm.sock;  

     #使用socket连接非IP地址,速度快些,但是只适合nginx和php在同一台设备上

}

转载于:https://www.cnblogs.com/djoker/p/6396377.html

你可能感兴趣的:(Nginx笔记总结四:Nginx连接PHP5.4)