cPanel is used on shared hosting when there are many websites using the same server and shared IP address. When you just request the IP address, your host doesn't know which of the many hosted sites you want. That is the reason that your host is returning a 404 error. There are a few ways to get around this.
Use a subdomain for your origin
You can change your origin server to use a different host name. In cPanel, you can accomplish this by changing the primary domain. So your origin server used to be
example.com but in the future it might be
origin.example.com. You would need to add DNS records for this subdomain that point to the same server IP address. Then point the
www.example.com records to your proxy server and configure your proxy server to proxy
It would also be a good idea to put canonical tags in your pages with your preferred host name (
origin.example.com) so that if search engines find the non-proxied version, they don't index it.
Configure your proxy to send a
The requests that specify your origin server by IP address (
18.104.22.168 for example) just need to be upgraded with the domain name to use. The configuration for this depends on the proxy software you are using. If you are using Apache with mod_proxy, you can use the
ProxyPass "/" "http://22.214.171.124/"
ProxyPassReverse "/" "http://126.96.36.199/"
RequestHeader set Host www.example.com
Use your /etc/hosts file
On your proxy server you could override DNS for example.com. You would configure your proxy server to proxy
http://www.example.com and change your
/etc/hosts file to have the IP address of your origin server (
188.8.131.52 for example).
184.108.40.206 example.com www.example.com