• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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!
 
Back
Top