• 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

Resolved https generates 502 bad gateway

Pier

New Pleskian
My environment:
OS: ‪Ubuntu 16.04.3 LTS‬
Product: Plesk Onyx 17.5.3 Update #27
Nginx is running as a proxy server

all the websites there are running fine with http, when I try to use https I always receive a 502 bad gateway error (for all the websites hosted there).

What I did:
i created a website for testing purposes, testam.memoka.it (plain wordpress install).
I successfully Installed the Let's Encrypt certificate
I disabled fail2ban (for testing)
I disabled modsecurity (for testing)
https://testam.memoka.it/ -> 502
testam – Un nuovo sito targato WordPress ->ok

I tried php 7.0.13 fastcgi and FPM, nothing changes.

Looking into the logs I found this:

2384#0: *87 connect() failed (111: Connection refused) while connecting to upstream nginx error

any hint to fix this problem?

thanks
 
Make sure that Apache ssl_module is loaded. For CentOS, for example:

# httpd -M | grep ssl
ssl_module (shared)
Syntax OK
 
Hello IgorG and thanks for your answer. I am on ubuntu so I did this:
check with phpinfo() and everything seems to be ok
ssl.jpg

but... if I run
# apache2 -M | grep ssl
I get this

[Fri Nov 03 11:09:22.754609 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Fri Nov 03 11:09:22.754660 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Nov 03 11:09:22.754671 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Nov 03 11:09:22.754677 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Nov 03 11:09:22.754684 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Nov 03 11:09:22.764366 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Fri Nov 03 11:09:22.765535 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Nov 03 11:09:22.771014 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Nov 03 11:09:22.771044 2017] [core:warn] [pid 30604] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
 
Back
Top