• 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.

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