Sometimes it is necessary to disable http://ip/~username account access for any reason. Site can be unavailable or simply you don’t want users to access it in such a way. There is a simple directive in httpd.conf that will stop it. Just find the following lines and make them the same as below:
<IfModule mod_userdir.c>
#UserDir public_html
UserDir disabled
</IfModule>
Mod_userdir is active by default so you should pay attention to it if you don’t really want your site to be displayed with IP and username