• 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 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).
 
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
 
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!
 
Back
Top