使nginx支持PHP

 rpm -ivh epel-release-5-4.noarch.rpm 

 
yum -y install lighttpd
yum -y install lighttpd-fastcgi
yum install spawn-fcgi
 
yum -y install php
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
 
spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u www -f /usr/bin/php-cgi 
 
 
nginx.conf---->
location ~ \.php$ {
fastcgi_pass   localhost:9000; 
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME    /data/web/$fastcgi_script_name;  
include /data/nginx/conf/fastcgi_params;
}

你可能感兴趣的:(linux,nginx,PHP,职场,休闲)