• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff 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