How to allow/disallow access to a domain via the server IP ( http://serverip/~username ) ?
1. Log in to the server WHM as ‘root’.
2. Go to Main >> Security Center >> Apache mod_userdir Tweak.
3. There you will find the option to enable/disable this for a particular domain as well as server wide implementation.