nginx 配置php环境:
nginx 配置php环境:安装php php-fpm
cp /etc/php.ini /usr/local/php5.3.22/lib/
修改:/usr/local/php5.3.22/etc/php-fpm.conf
user = nobody
group = nobody
启动php-fpm
/usr/local/php5.3.22/sbin/php-fpm
查看是否启动了9000端口:
netstat -ntplu | grep 9000
配置nginx:
usernobody;
worker_processes1;
server
{
listen80;
server_namelocalhost;
location / {
root html;
indexindex.html index.htm index.php;
}
location ~ \.php$ {
root /usr/local/nginx/html/php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME/usr/local/nginx/html/php$fastcgi_script_name;
include fastcgi_params;
}
}
页:
[1]