ubuntu 12.10 默许安装php5-fpm无监听9000端口,nginx无法链接php5-fpm修正

WBOY
Release: 2016-06-13 11:18:32
Original
959 people have browsed it

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后,恢复。

财哥的博客

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!