• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Resolved nginx/apache proxy issue on all domains and webmail / ubuntu 22.04 on arm / external ip instead of localhost

themaxx32000

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
18.0.60
- Ubuntu 22.04 on ARM
- Fresh install with restored backup on a new machine (new IP)

- all Websites and their Webmail-Subdomains throw 502`s by nginx
- disabling nginx-proxying fixes the Websites but not webmail (as it is always using apache)
- proxy_error_log shows connect() failed (111: Connection refused) while connecting to upstream, client for each request
note: each request is sent from nginx to apache using the servers external ip, i.e. https://w.x.y.z:7081 and not https://127.0.0.1:7081
- using curl via ssh locally on throws a curl: (7) Failed to connect to W.X.Y.Z port 7081 after 0 ms: Connection refused
- checking apaches listening ports shows that it is listening only on 127.0.0.1:7081 and 127.0.0.1:7080
- modifying /etc/nginx/plesk.conf.d/webmails/sample.com_webmail.conf 's proxy_pass rule from the servers external ip to 127.0.0.1 also fixes webmail

What is wrong here?
 
more structured as I cannot edit my first message anymore:

Info:
  • Ubuntu 22.04 on ARM
  • fresh install with restored backup on a new machine (new IP)
Facts:
  • all Websites and their Webmail-Subdomains throw 502`s by nginx
  • disabling nginx-proxying fixes the Websites but not webmail (as it is always using apache)
  • proxy_error_log shows connect() failed (111: Connection refused) while connecting to upstream, client for each request
  • note: each request is sent from nginx to apache using the servers external ip, i.e. https://w.x.y.z:7081 and not https://127.0.0.1:7081
  • using curl via ssh locally on w.x.y.z:7081 throws a curl: (7) Failed to connect to W.X.Y.Z port 7081 after 0 ms: Connection refused (same for w.x.y.z:7080)
  • using curl via ssh locally on 127.0.0.1:7081 and 127.0.0.1:7080 works fine
  • checking apaches listening ports shows that it is listening only on 127.0.0.1:7081 and 127.0.0.1:7080
  • modifying /etc/nginx/plesk.conf.d/webmails/sample.com_webmail.conf 's proxy_pass rule from the servers external ip to 127.0.0.1 also fixes webmail
Questions:
  • why is the servers external ip even in all of apaches config-files when apache is listening to localhost only?
  • why is nginx using the servers external in its proxy_pass rules for the same reason?
  • what is wrong here?
 
on another x86 Plesk Server running 18.0.59, apache is listening on 0.0.0.0:7080 / 0.0.0.0:7081 instead of localhost / 127.0.0.1 (which of course would also fix the issue, however the configuration on the new server is different and I need to know how to fix this).
 
Can't tell for sure. The server, the backup was taken from, went offline yesterday night, so I guess it would be either the latest .60 or .59
 
This was the solution to my issue regarding "proxy mode" activated, crashing all domains on my server after recovering plesk from backup.
With the solution above, I am now able to activate "Proxy mode" again.
So simple!
 
ok I fixed the issue but this needs to be implemeted in the restore routine:

disabling and re-enabling the Localhost Mode fixes the configs:

plesk bin apache --listen-on-localhost false && plesk bin apache --listen-on-localhost true
This was the solution for me too after restoring my plesk installation from a backup generated on 18.0.61 and recovered on 18.0.61. All of my domains were crashing with 502 (unless I disabled proxy-mode, which is not a fix, obviously). Thank you!
 
ok I fixed the issue but this needs to be implemeted in the restore routine:

disabling and re-enabling the Localhost Mode fixes the configs:

plesk bin apache --listen-on-localhost false && plesk bin apache --listen-on-localhost true

This was the solution for me too.

Similar background story:
- Fresh Plesk installation in Debian 12 (from Ubuntu 24)
- Same Server + Same IP
- Newly added IPv6 to the server
- Successfully restored Plesk from Backup (18.0.68)

ALL domains were crashing with 502 nginx Connection refused error.

Many thanks for figuring it out!
 
Back
Top