apt-get install nginx
apt-get install php-cgi php-mysql php-gd
apt-get install mysql-server
apt-get install rcconf
apt-get install lighttpd
update-rc.d -f lighttpd remove
# 也可以用rcconf
去 除
lighttpd
vi
/etc/nginx/sites-available/default
#
index的一行修改为: 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;
}
vi /etc/rc.local
# 加入
spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -g www-data
shutdown -r now
#
重启后即执行 rc.local 中脚本,启动 Fast CGI 进程