sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get install php5-fpm
After that when i try to view page that contain php code, the server going error.I view Nginx error from "/var/log/nginx/error.log"
2014/06/10 06:37:18 [crit] 481#0: *1 connect() to unix:/var/run/php5-fpm.sock:", host: "yourdomain.com"
Then found some solution from http://www.queryadmin.com/921/connect-unix-var-run-php5-fpm-sock-failed/:
Edit the pool file "/etc/php5/fpm/pool.d/www.conf" and change:
listen = /var/run/php5-fpm.sock
to this:
listen = 127.0.0.1:9000
Edit the Nginx vHost file "/etc/nginx/sites-available/default" and change:
location ~ \.php$
{
...
fastcgi_pass unix:/var/run/php5-fpm.sock;
...
}
to this:
location ~ \.php$
{
...
fastcgi_pass 127.0.0.1:9000;
...
}
** If you wrote the fastcgi_pass on /etc/nginx/fastcgi_params file, edit it too.Restart PHP5-FPM service:
/etc/init.d/php5-fpm restart
Restart Nginx service:
/etc/init.d/nginx restart
That's it, you may solved the issue now. Have Fun.
0 comments:
Post a Comment