• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • 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.

Issue Help needed with restoring users IP when coming from Cloudflare, Provided Doc script not working for me.

raykai

Basic Pleskian
Server operating system version
Debian 10.12
Plesk version and microupdate number
Plesk Obsidian 18.0.44 Update #3
Hi, I have Plesk set up as default as Nginx ( Reverse Proxy Server ) > Apache.

I'm trying to restore the true users IP that comes from the Cloudflare proxy. I got Apache to give the users true IP but I can't get Nginx to do it server-wide.

Snipaste_2022-06-28_13-33-53.png

I do have logs that are showing Cloudflare IP with Nginx like in the screenshot the IP 162.158.126.206 = Cloudflare, Inc.

When following the guide for the Server-wide solution with Nginx enabled: https://support.plesk.com/hc/en-us/...behind-load-balancer-or-reverse-forward-proxy

When I run the provided script cf.sh with the Plesk Scheduled Tasks I get this error:
Code:
Nginx is not in use on this Plesk server. Exiting... /cf.sh: line 7: /usr/local/psa/admin/bin/nginxmng: No such file or directory

When I run the provided script in SSH /root/cf.sh I get an error:
Code:
# /root/cf.sh
Previous execution of the script failed!
There is /etc/nginx/conf.d/cf-stop
Review the script functional and remove the /etc/nginx/conf.d/cf-stop
The script execution was halted.

I have also added real_ip_header CF-Connecting-IP; in nginx directives but it does not seem to work

How can I fix this for it to work?
 
I need help with this, please. As my logs in /var/log/nginx/access.log are still showing Cloudflare Ips
 
Back
Top