• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

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