博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

nginx+PHP配置

Posted on 2012-07-22 22:34  bug yang  阅读(162)  评论(0编辑  收藏  举报

 

sudo apt-get install lighttpd

spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -u www-data -g www-data -f /usr/bin/php-cgi

 

 

 location ~ .*\.(php|php5)?${    #fastcgi_pass unix:/tmp/php-cgi.sock;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME    $document_root$fastcgi_script_name;  添加此行即可
    #include fcgi.conf;

}