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

Input Webmail 502 Bad Gateway

Mario Chamorro

New Pleskian
Server operating system version
Ubuntu 24.04
Plesk version and microupdate number
Plesk 18.0.61 Ubuntu 24.04 1800240703.08
I installed a new server with Ubuntu 24.04 and migrated my Plesk installation from the old Ubuntu 22.04 VM to the new 24.04 VM.

Everything was fine except for the web service. The domain sites did not load and returned 502 Bad Gateway.
I resolved that by disabling Nginx Apache2 proxy service:
Websites & Domains >> domain.com >> Hosting & DNS >> Apache & Nginx >> Nginx settings >> Proxy mode ( UNCLICK ) .

Then I found that Webmail did not work with the same 502 error. There was no configuration screen for RoundCube Webmail, so I went to the command line. I found errors similar to this:

2024/07/08 23:12:05 [error] 553928#0: *19597 connect() failed (111: Connection refused) while connecting to upstream, client: 73.124.126.141, server: webmail.chamorro.us, request: "GET / HTTP/2.0", upstream: "https://69.84.155.155:7081/", host: "webmail.chamorro.us"

so I looked to see if something was listening on 155:7081 , and behold, nothing was. Apache2 was listening on localhost:7081 , but not a public interface. After looking in /etc/apache2/apache2.conf , the difference was in /etc/apache2/ports.conf . Previously, Apache was configured to listen for port 7081 on All IPs, but now in Ubuntu 24.04, it is configured to listen only on 127.0.0.1:7081 . I changed it to listen to all ports, restarted Apache2, and now Webmail is fixed. The 000-default.conf file references port 7080, so I did not change that, but you may decide to change it from the new 127.0.0.1:7080 to the old *:7080

I hope this saves you some time running your Plesk server! -- Mario Chamorro

# ---
# old Ubuntu 22.04 /etc/apache2/ports.conf
# ---
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 7080

<IfModule ssl_module>
Listen 7081
</IfModule>

<IfModule mod_gnutls.c>
Listen 7081
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

# ---
# new Ubuntu 24.04 /etc/apache2/ports.conf ( change 127.0.0.1:7081 to Listen 7081 or Listen *:7081 )
# ---
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 127.0.0.1:7080

<IfModule ssl_module>
Listen 127.0.0.1:7081
</IfModule>

<IfModule mod_gnutls.c>
Listen 127.0.0.1:7081
</IfModule>
 
Back
Top