• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question WHMCS and Plesk

NicolasP.

Regular Pleskian
Hello everyone.

I am using WHMCS and Plesk Onxy on the same server.

I have already enabled graceful restart based on this article How to enable graceful restart for Apache? and Apache restart interval (seconds) to 240.

But when I am trying to create a domain through WHMCS, I am getting "Timeout/502 Bad Gateway error".

All my websites run on nginx.

Server Details:
Ubuntu 16.04.3 LTS
Plesk Onyx v17.5.3

Thank you
 
And WHMCS in Plesk log gives this error
9513#0: *48601 recv() failed (104: Connection reset by peer) while reading response header from upstream
 
Did you add both, the public IPv4 address of your server and the localhost 127.0.0.1 address, to the white list of Fail2Ban?
 
Yes I did already.
I just changed nginx to apache in whmcs domain and it worked.
So, does nginx support graceful restart?
 
Could you please clarify what you mean by "changed nginx to apache"?

Nginx supports graceful restarts. A graceful restart is the same like a "reload". It simply reloads the configuration, but leaves the web server instances that are running, intact. An nginx restart if graceful or not can hardly be noticed. The 502 issue with the non-graceful restarts results from the fact, that in case of a real restart of Apache, the Apache web server instance that Nginx is waiting on, becomes unavailable, hence no answer is sent to Nginx.
 
I changed "FPM Application served by nginx" to "FPM Application served by apache" on domain hosting settings.
 
In that case it is most likely an issue with the .htaccess rewrite configuration. When .php files shall be processed by Nginx, Nginx will ignore .htaccess (because it does not know that format). Instead, you must then translate your .htaccess Apache rules into Nginx syntax.

I'd consider this case "solved", because this is merely a configuration issue of the website, not a Plesk or web server issue.
 
Back
Top