• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Issue 502 Bad Gateway

Kingsley

Silver Pleskian
Hello;

I am having 502 Bad Gateway error when testing payment on my whmcs install. i use FPM application serve by Apache with PHP7.0.19.

proxy error log

Code:
2017/05/31 22:10:48 [error] 19763#0: *11359 upstream prematurely closed connection while reading response header from upstream, client: 169.159.70.99, server: sproutserver.com, request: "GET /members/modules/gateways/callback/paystack.php?invoiceid=13&trxref=13_1496264982 HTTP/2.0", upstream: "https://158.69.251.21:7081/members/modules/gateways/callback/paystack.php?invoiceid=13&trxref=13_1496264982", host: "sproutserver.com", referrer: "https://sproutserver.com/members/viewinvoice.php?id=13"
2017/05/31 22:10:49 [error] 19763#0: *11359 connect() failed (111: Connection refused) while connecting to upstream, client: 169.159.70.99, server: sproutserver.com, request: "GET /favicon.ico HTTP/2.0", upstream: "https://158.69.251.21:7081/favicon.ico", host: "sproutserver.com"

When i change to FPM application serve by nginx i get 404 error for both wordpress and whmcs
 
1.You have to increase you PHP execution time.

2. .htaccess is not supported when you served by nginx.. so you have to recreate rewrite rules in nginx way.
 
1.You have to increase you PHP execution time.

2. .htaccess is not supported when you served by nginx.. so you have to recreate rewrite rules in nginx way.

PHP execution time is already 1800sec
how do i get the rewrite rule to work?
 
The only way to get my installation to work NGINX was PHP5.6 with FPM. Anything PHP7 and above with NGINX, FPM, FastCGI, or Apache combination would not work. If anyone has been able to get this to work, please post ASAP. Thanks!
 
The only way to get my installation to work NGINX was PHP5.6 with FPM. Anything PHP7 and above with NGINX, FPM, FastCGI, or Apache combination would not work. If anyone has been able to get this to work, please post ASAP. Thanks!

This is an indication that the script is using a PHP function that is no longer supported in PHP 7 or newer. When this is used in combination with AJAX, it leads to the 502 error, because a response to a request is never received by Nginx as PHP does not finish the PHP request. If error messages and logging are turned off this will also happen in regular (non AJAX) requests. I guess that the only proper way to ensure operatability is to update the script and replace all deprecated PHP functions by current functions.
 
Back
Top