• 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

Plesk 12 SSL nginx 502 bad gateway

IulianOlaru

Basic Pleskian
Hey guys,
I am significant need of help from you regarding my intention to install an SSL certificate from Comodo.

I am using Plesk 12 on Centos 7 with nginx ...

After I have enabled the SSL in the domain, nginx is giving a 502 bad gateway error.

The nginx error log shows something like this:

Code:
2016/02/04 13:06:37 [info] 27426#0: *39 client sent plain HTTP request to HTTPS port while reading client request headers, client: 61.216.2.13, server: , request: "POST /404 HTTP/1.1", host: "8.8.8.8"
2016/02/04 13:08:52 [info] 27426#0: *49 client 95.76.31.191 closed keepalive connection

What is there to do in this situation? I tried several knowledge base fixes but with no results...

I also cannot seem to find the nginx configuration file of the domain. Everything I found were automatically generated ...

With positive feelings I am sincerely waiting for your reply.
 
This seems to be a not-so-uncommon problem, but I have yet to find any cause or solution for it.
 
You should understand that error "502 bad gateway" can arise for Plesk admin interface or for a site on the webserver. As far as I understood you have this error when you operate with Plesk interface. Therefore, you should troubleshoot Plesk sw-cp-server, Plesk sw-engine but not webserver. Try to found something useful in corresponding logs for this case. There are many related KB articles regarding "502 bad gateway" error for Plesk admin interface.
 
Thank you so much, Igor, looking into both of those now.

I forgot to mention that the problem occured after I updated the panel.

There my be a hitch with my certificate installation, but the panel would throw an error that would result in the ('no other option') nginx one... but thanks for pointing me in the right direction.
 
Last edited:
I think I found it.

[10-Mar-2016 11:35:36 Europe/Berlin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4294967296 bytes) in Unknown on line 0

I understand that Plesk runs in its own apache environment, which would mean that it would have its own php.ini file as well?

And what the (expletive) would try to allocate 4gb of memory?!
 
Last edited:
Just increase the memory_limit value in /usr/local/psa/admin/conf/php.ini file and restart psa service.
 
Back
Top