ubuntu 12.10 默認安裝php5-fpm無監聽9000端口,nginx無法鏈接php5-fpm修正

升級到ubuntu 12.10 後nginx報502錯誤,php無法運行。
netstat -an未發現監聽9000端口。
查看/var/log/php5-fpm.log一切正常。
隨後查看/etc/php5/fpm/pool.d/www.conf,發現listen = /var/run/php5-fpm.sock。

修改nginx下的sites配置
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param APPLICATION_ENV production;
include fastcgi_params;
}


location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

重啓php5-fpm與nginx後,恢復。

[url=http://blog.sina.com.cn/s/blog_6a0b2afd01014acf.html]財哥的博客[/url]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章