It looks like you're new here. If you want to get involved, click one of these buttons!
After i rebooted my server, i get the nginx error: 502 Bad Gateway
How can i fix that?
maybe php-cgi / php-fpm is not running?
service php-cgi start service php-fpm start
Daniel.
i started php-cgi but still showing that error
Here is a small error log:
2012/09/14 20:17:30 [crit] 810#0: *24 connect() to unix:/var/run/www/php.sock failed (2: No such file or directory) while connecting to upstream, client: XXXXXX, server: XXXXXX, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/var/run/www/php.sock:", host: "XXXXX"
@joodle PHP-FPM permissions to that file? http://www.ruby-forum.com/topic/4236563
@AsadHaider i dont use php-fpm
Try to create folder /var/run/www/ and set permision to www-data:www-data
Try this:D
mkdir /var/run/www/; chown -R www-data:www-data /var/run/www
Then restart php-cgi.
⌦ BudgetVPS: Where to find the cheapest VPS offer ⌦ DICHVU.IT: All about SSL - PositiveSSL from $7.4/year - EV SSL from $50/year ⌦ My blog: A small place of me :D
@giang you are my hero!
I was right with the permissions part :P
@joodle said: @giang you are my hero!
Glad that could help you :D It seems you are using LowEndAdmin's script :D
@giang yep im using that script
@joodle: why not php-fpm?
@tinyray said: @joodle: why not php-fpm?
php-cgi works fine for me, so why should i choose php-fpm?
It's far better, for one.
Freelance Linux/Unix consultant, contact me if you need help!
yea, and it runs as own process
@joodle said: @giang yep im using that script
I got this problem with LEA's script too :P That's why I could figure out how to fix it. This only happens on Ubuntu OS :D
I did test php-fpm and php-cgi on my VPS, php-cgi processed Wordpress faster than php-fpm a little bit (about .2s)
you must use temp folder for php socket it's better, edit php-cgi config and change this line "unix:/var/run/www/php.sock" to this:
unix:/tmp/php.sock and chown tmp directory : chown -R www-data:www-data /tmp
unix:/tmp/php.sock
chown -R www-data:www-data /tmp
then restart nginx + php-cgi :)
@giang said: php-cgi processed Wordpress faster than php-fpm a little bit (about .2s)
Probably because php-fpm needs more time to spawning process / children. Try static instead of dynamic or ondemand
static
chown the whole tmp directory to www-data? Not a great idea...
@William said: chown the whole tmp directory to www-data?
tmp folder is 777 already?
Comments
maybe php-cgi / php-fpm is not running?
service php-cgi start service php-fpm start
Daniel.
i started php-cgi but still showing that error
Here is a small error log:
@joodle PHP-FPM permissions to that file? http://www.ruby-forum.com/topic/4236563
Unix IO - VPS/Dedicated Server Offers & Deals, Provider Reviews, and Tutorials/Guides
Chat with us at irc.freenode.net // #unixio
@AsadHaider i dont use php-fpm
Try to create folder /var/run/www/ and set permision to www-data:www-data
Try this:D
Then restart php-cgi.
⌦ BudgetVPS: Where to find the cheapest VPS offer ⌦ DICHVU.IT: All about SSL - PositiveSSL from $7.4/year - EV SSL from $50/year ⌦ My blog: A small place of me :D
@giang you are my hero!
I was right with the permissions part :P
Unix IO - VPS/Dedicated Server Offers & Deals, Provider Reviews, and Tutorials/Guides
Chat with us at irc.freenode.net // #unixio
Glad that could help you :D It seems you are using LowEndAdmin's script :D
⌦ BudgetVPS: Where to find the cheapest VPS offer ⌦ DICHVU.IT: All about SSL - PositiveSSL from $7.4/year - EV SSL from $50/year ⌦ My blog: A small place of me :D
@giang yep im using that script
@joodle: why not php-fpm?
php-cgi works fine for me, so why should i choose php-fpm?
It's far better, for one.
Freelance Linux/Unix consultant, contact me if you need help!
yea, and it runs as own process
I got this problem with LEA's script too :P That's why I could figure out how to fix it. This only happens on Ubuntu OS :D
I did test php-fpm and php-cgi on my VPS, php-cgi processed Wordpress faster than php-fpm a little bit (about .2s)
⌦ BudgetVPS: Where to find the cheapest VPS offer ⌦ DICHVU.IT: All about SSL - PositiveSSL from $7.4/year - EV SSL from $50/year ⌦ My blog: A small place of me :D
you must use temp folder for php socket it's better, edit php-cgi config and change this line "unix:/var/run/www/php.sock" to this:
unix:/tmp/php.sockand chown tmp directory :chown -R www-data:www-data /tmpthen restart nginx + php-cgi :)
Probably because php-fpm needs more time to spawning process / children. Try
staticinstead of dynamic or ondemandchown the whole tmp directory to www-data? Not a great idea...
tmp folder is 777 already?
⌦ BudgetVPS: Where to find the cheapest VPS offer ⌦ DICHVU.IT: All about SSL - PositiveSSL from $7.4/year - EV SSL from $50/year ⌦ My blog: A small place of me :D