500 Internal Server Error nginx after setting set_real_ip_from

first my server is composed of linux + nginx ,
and i have some trouble in nginx access log because of it always show the cloudflare’s cdn ip.
i want to change it.
then i found this page https://support.cloudflare.com/hc/zh-cn/articles/200170786
then i copy it ,then it’s solved my problem
but when i used VPN to access my website,i found i get a new trouble.
it always tell you “500 Internal Server Error nginx”
but when i disconnect vpn , i can access it sucessful
i can’t found anything by google,
please help me

Rewriting IP addresses is a good choice, but that’s unfortunately purely an error on your server and not Cloudflare related. You need to check your error log and debug that. StackExchange might also be able to help.

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.