Difference between revisions of "Talk:Raspberry Pi Script"

From FusionPBX
Jump to: navigation, search
(Script misconfigures www.conf wrong, causing 502 bad gateway error)
 
m
Line 3: Line 3:
 
Using the Google a bit, it turns out this is an issue when php-fpm and nginx try to talk with each other on different channels.
 
Using the Google a bit, it turns out this is an issue when php-fpm and nginx try to talk with each other on different channels.
  
The script configures www.conf with a line like:
+
The script configures /etc/php5/fpm/pool.d/www.conf with a line like:
  
 
listen = /var/run/php5-fpm.sock
 
listen = /var/run/php5-fpm.sock
Line 11: Line 11:
 
listen = 127.0.0.1:9000
 
listen = 127.0.0.1:9000
  
so that configuration file has to be modified and then php-fpm needs to be restarted; after that, the configuration page shows up as expected.
+
so that configuration file has to be modified and then php-fpm needs to be restarted:
 +
 
 +
/etc/init.d/php5-fpm stop && sleep 10 && /etc/init.d/php5-fpm start
 +
 
 +
after that, the configuration page shows up as expected.
  
 
I'm running this on a BeagleBone Black, not on a RaspberryPi, but that shouldn't make the difference ;)
 
I'm running this on a BeagleBone Black, not on a RaspberryPi, but that shouldn't make the difference ;)

Revision as of 14:28, 8 September 2013

The script seems to have a bug, from what I can tell. The symptom is, that at the very end of the script, when one's prompted to finish from the web browser, one gets an "502 bad gateway error" page served up by nginx instead of the expected configuration page.

Using the Google a bit, it turns out this is an issue when php-fpm and nginx try to talk with each other on different channels.

The script configures /etc/php5/fpm/pool.d/www.conf with a line like:

listen = /var/run/php5-fpm.sock

but it should be

listen = 127.0.0.1:9000

so that configuration file has to be modified and then php-fpm needs to be restarted:

/etc/init.d/php5-fpm stop && sleep 10 && /etc/init.d/php5-fpm start

after that, the configuration page shows up as expected.

I'm running this on a BeagleBone Black, not on a RaspberryPi, but that shouldn't make the difference ;)