Nginx学习笔记3--Nginx和PHP(fastCGI)的配置和优化

php和nginx的配置

server{
  root html;
  listen 80;
  server_name a.com;
  index index.php index.html ;
     location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

}

 

posted @ 2014-09-15 11:13  闲云-野鹤  阅读(175)  评论(0编辑  收藏  举报