• 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

Question Configuring Plesk with a Reverse Proxy and Cloudflare

ido123

New Pleskian
Hello everyone,
I'm currently working to set up a reverse proxy (NGINX, then Caddy) in front of a Plesk server, with Cloudflare for DNS and CDN. I have been facing several issues and I'm hoping someone here might help point me in the right direction.
Here is my setup:
1. I have a Plesk server that's hosting my website.
2. I am using another server as a reverse proxy to the Plesk server. Originally, I tried setting this up with NGINX and then switched to Caddy to see if it would resolve my issues.
3. In Cloudflare, DNS entries are configured to direct my domain traffic to the reverse proxy server.
4. SSL/TLS mode on Cloudflare is set to "Full".
My issues are:
1. I cannot access my website using my domain. It results in a 522 error.
2. When I remove the reverse-proxy layer and configure my DNS in Cloudflare to point directly to the Plesk server, everything works fine.
3. I have tried changing between different SSL/TLS modes in Cloudflare, but the issue remains.
4. I encountered a redirection loop ("redirected you too many times") issue when I switched from NGINX to Caddy.
I'm looking for guidance on how to properly configure my reverse proxy to work with the Plesk server and Cloudflare. Please ask if you need more details about my configurations, and I'll provide as much info as I can.
Thank you for your help!
 
I suggest checking that the reverse proxy server can communicate with the Plesk server and that the reverse proxy configuration is correct. You have to make sure that the Plesk server is configured to accept connections from the reverse proxy server and that the Cloudflare DNS records are correct.

For the 522 error, check the reverse proxy configuration, the Plesk firewall, and the Cloudflare DNS record. For the redirection loop, check the reverse proxy configuration for any redirection loops.

That's all, it should work.
 
Back
Top