AbramS
Basic Pleskian
I recently acquired a brand-new CentOS 6.3 VPS with Plesk 11.0 pre-installed. After getting everything up and running and installing some additional PHP versions I noticed that Nginx worked but Nginx with PHP-FPM enabled caused 502 Bad Gateway errors.
Today I took the time to completely reinstall following these steps:
1. Reinstall CentOS6.3 / Plesk Image.
2. Activate Plesk panel 11.0
3. Yum Update all system and package files.
4. Update to Plesk 11.5.30 Update #8
5. Enable RoundCube through 'Add or Remove Components'
6. Check if all components are up to date through the panel
7. Check yum update once more
8. Install Remi and EPEL repo's and give them low priorities to prevent them updating all sorts of files.
9. Install PHP-FPM through 'Add or Remove Components'
10. Create new service plan
11. Create test domain inspyred.nl
12. Enable 'Serve static files directly by nginx' and 'Process PHP by nginx'
13. Create info.php (<?php phpinfo(); ?>) inside the default 'test' folder.
14. Navigate to inspyred.nl/test/info.php
The results remains the same: 502 bad gateway.
I then checked /var/log/php-fpm/error.log for errors:
Requested PHP-FPM status:
Restarted PHP-FPM:
Requested nginx status:
Restarted nginx:
And finally checked /var/log/nginx/error.log for errors and found:
I had already seen this in the previous installation so I have already tried adding additional group rights to nginx...
How can I fix this?
Today I took the time to completely reinstall following these steps:
1. Reinstall CentOS6.3 / Plesk Image.
2. Activate Plesk panel 11.0
3. Yum Update all system and package files.
4. Update to Plesk 11.5.30 Update #8
5. Enable RoundCube through 'Add or Remove Components'
6. Check if all components are up to date through the panel
7. Check yum update once more
8. Install Remi and EPEL repo's and give them low priorities to prevent them updating all sorts of files.
9. Install PHP-FPM through 'Add or Remove Components'
10. Create new service plan
11. Create test domain inspyred.nl
12. Enable 'Serve static files directly by nginx' and 'Process PHP by nginx'
13. Create info.php (<?php phpinfo(); ?>) inside the default 'test' folder.
14. Navigate to inspyred.nl/test/info.php
The results remains the same: 502 bad gateway.
I then checked /var/log/php-fpm/error.log for errors:
Code:
[29-Jul-2013 18:24:50] NOTICE: fpm is running, pid 4682
[29-Jul-2013 18:24:50] NOTICE: ready to handle connections
Code:
php-fpm (pid 4682) is running...
Code:
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
Code:
nginx (pid 2570) is running...
Code:
Starting nginx: [ OK ]
Code:
2013/07/29 18:29:04 [crit] 4592#0: *89 connect() to unix:/var/www/vhosts/system/inspyred.nl/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: xx.xx.xx.xx, server: inspyred.nl, request: "GET /test/info.php HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/inspyred.nl/php-fpm.sock:", host: "inspyred.nl"
I had already seen this in the previous installation so I have already tried adding additional group rights to nginx...
How can I fix this?