1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Question WHMCS and Plesk

Discussion in 'Plesk Onyx for Linux' started by NicolasP., Dec 4, 2017.

  1. NicolasP.

    NicolasP. Basic Pleskian

    14
    60%
    Joined:
    Jul 4, 2014
    Messages:
    97
    Likes Received:
    4
    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
     
  2. NicolasP.

    NicolasP. Basic Pleskian

    14
    60%
    Joined:
    Jul 4, 2014
    Messages:
    97
    Likes Received:
    4
    And WHMCS in Plesk log gives this error
    9513#0: *48601 recv() failed (104: Connection reset by peer) while reading response header from upstream
     
  3. Peter Debik

    Peter Debik Golden Pleskian Plesk Guru

    37
    80%
    Joined:
    Oct 15, 2015
    Messages:
    1,981
    Likes Received:
    403
    Location:
    Berlin, Germany
    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?
     
  4. NicolasP.

    NicolasP. Basic Pleskian

    14
    60%
    Joined:
    Jul 4, 2014
    Messages:
    97
    Likes Received:
    4
    Yes I did already.
    I just changed nginx to apache in whmcs domain and it worked.
    So, does nginx support graceful restart?
     
  5. Peter Debik

    Peter Debik Golden Pleskian Plesk Guru

    37
    80%
    Joined:
    Oct 15, 2015
    Messages:
    1,981
    Likes Received:
    403
    Location:
    Berlin, Germany
    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.
     
  6. NicolasP.

    NicolasP. Basic Pleskian

    14
    60%
    Joined:
    Jul 4, 2014
    Messages:
    97
    Likes Received:
    4
    I changed "FPM Application served by nginx" to "FPM Application served by apache" on domain hosting settings.
     
  7. Peter Debik

    Peter Debik Golden Pleskian Plesk Guru

    37
    80%
    Joined:
    Oct 15, 2015
    Messages:
    1,981
    Likes Received:
    403
    Location:
    Berlin, Germany
    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.
     
    IgorG likes this.
Loading...