Solution to the problem of being unable to log in to the WHMCS backend after applying CDN acceleration using WHMCS

888u

Last update at :2024-03-08,Edit by888u

Recently, I was helping a client with the WHMCS financial system. The client requested a CDN for the security of the entire platform system, so I used a paid CDN to accelerate it, and the effect was quite good.

But here comes the problem. After the CDN is installed on the entire site, no matter whether it is the front or backend, you cannot log in or you can log in unlimitedly. Later, you can just modify the configuration.php file directly, which is still simple.

Modify the configuration.php file

$_SERVER[‘REMOTE_ADDR’] = $_SERVER[‘HTTP_X_FORWARDED_FOR’]; // Get the real IP list($_SERVER['REMOTE_ADDR']) = explode(', ', $_SERVER['REMOTE_ADDR'], 2); // Possibly through multiple proxies, the first one is realip address $_SERVER[‘HTTP_X_FORWARDED_FOR’] = $_SERVER[‘REMOTE_ADDR’]; // Add to WHMCS IP variable

Perfect solution after modification!

This article is reprinted to loc.

Recommended site search: Korean high-defense server, Korean server recommendation, Hong Kong vps host, Wanwang domain name space, IP address, how much does it cost to rent a server for one year, Taiwan host, Ministry of Industry and Information Technology website registration, .China domain name,

Solution to the problem of being unable to log in to the WHMCS backend after applying CDN acceleration using WHMCS

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码