To do so you need to create a wild card subdomain.
In cPanel, go to "Subdomains" and create a subdomain named " * " pointing to "/public_html".
After that has been created, you need to add an A record in DNS.
In cPanel, go to "Advanced DNS Zone Editor" and create a record named "*" type "A" Record "your server IP".
Once that has been created, you will need to wait a while for DNS to propagate.