Most of your might have experienced that after using Ubuntu 20.x LTS + Plesk their websites are getting random CloudFlare 520 errors.
Cause:
The error is caused due to invalid headers.
Fix:
It has been resolved by adding the following line to nginx configuration file /etc/nginx/conf.d/enable_proxy_hide_header_upgrade.conf:
proxy_hide_header Upgrade;