ubuntu下安装nginx和php

sudo apt-get install nginx php5 php5-cli php5-cgi spawn-fcgi

sudo vim /etc/nginx/sites-available/default

index index.php index.html index.htm;

location ~ \.php$ {

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param  SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;

include /etc/nginx/fastcgi_params;

}

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

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>