Categories
Tutorial

How to get visitor ip on cPanel NGINX Reverse Proxy with PHP

If you are using cPanel NGINX Reverse Proxy setup you may notice PHP $_SERVER['REMOTE_ADDR'] is returning server main IP address instead of visitor IP address.

To get visitor IP address use $_SERVER['HTTP_X_REAL_IP']

Source: https://stackoverflow.com/questions/44145688/remote-addr-ip-from-user-instead-of-nginx-reverse-proxy-server

Categories
Tutorial

How to edit Windows 11 HOSTS file

How to edit the hosts file on Windows 11: https://websiteforstudents.com/how-to-edit-windows-11-hosts-file/

In short, open Windows Terminal (Admin) or Command Prompt in Administrator Mode and type:

notepad.exe c:\Windows\System32\Drivers\etc\hosts
Categories
Solution

[Fix] Xiaomi MI 4A Router 5 GHz Issue

How to solve MI 4A Router (Gigabit & Regular, Global Version) 5 GHz not being available issue:

Links:
To get available countries: /api/xqsystem/country_code
To set country: /api/xqsystem/set_country_code?country=SG

Known issue with this fix: Mobile app stops working!

Categories
Tutorial

How to install watch faces on Haylou Solar

How to install custom 3rd party .bin watch faces on Haylou Solar: https://amazfitwatchfaces.com/forum/viewtopic.php?f=14&p=8339

Categories
Tutorial

DKIM Selector for CyberPanel

DKIM Selector for CyberPanel hosted web sites: default._domainkey

Details: https://cyberpanel.net/blog/2018/01/28/how-to-setup-spf-dkim-and-dmarc-inside-cyberpanel-manually/

Categories
Solution

Restoring visitors IP with mod_remoteip

Restoring visitors IP with mod_remoteip on cPanel: https://support.cpanel.net/hc/en-us/articles/360051107513-Restoring-visitors-IP-with-mod-remoteip

Categories
Solution

How to fix Cpanel Account Permissions

How to fix Cpanel Account Permissions

A script to fix permissions and ownership, on files and directories, for cPanel accounts.: https://github.com/PeachFlame/cPanel-fixperms

Categories
Tutorial

Enable EPEL on CentOS

How to enable EPEL on CentOS: https://www.vultr.com/docs/enable-epel-on-centos

sudo yum install epel-release
Categories
Solution

mysqli_real_connect(): Server sent charset (255) unknown to the client

To solve the issue check out: https://stackoverflow.com/a/43442839

Categories
Solution

restart CyberPanel

Restart CyberPanel service:

systemctl restart lscpd