http://126.96.36.199/~username is an apache mod called userdir. If enabled, it allows any user on the system to create a publichtml folder inside of their home folder and it can be accessed via the method above. For example, if the mod was enabled and my account on the server was mark and my home directory was /home/mark, I could create a folder called publichtml and put web files in there and access them via http://188.8.131.52/~mark
If you have multiple IP addresses you can set up IP based virtual hosting. This means accessing different websites uising different IPs all on the same server.
You also have name based virtual hosts, which lets you use multiple domains (or sub domains) and have them ‘resolve’ or map to different websites, all on the one IP address. This lets mydomain.com, domain.com and cool-domain.com all map to different websites, even though they’re all hosted on the one server. You just need to set up virtual host required.
cPanel typically uses a mix of both named based virtual hosting and user dir mod, which gives it the functionality you describe. This is a common set up in shared hosting.
Since you seen to be more interested than the userdir mod, I’ll focus on that.
Log in as root and type
Make sure it looks like below (as per debian instructions):
UserDir disabled root
Options MultiViews Indexes SymLinksIfOwnerMatch
<Limit GET POST OPTIONS>
Allow from all
<LimitExcept GET POST OPTIONS>
Deny from all
Edit php config to allow php in user dirs
Ensure it looks like this:
Require all granted
Require all denied
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
php_admin_value engine Off
Assuming you have a basic LAMP stack installed and configured, you should be able to add a user to the system, create a public_html folder in there and put some php/html pages and access them via http://184.108.40.206/~username
Remember to add files as the username you created, not root. Make sure the files have correct permissions. If you get access forbidden, run this command as the user you want the web pages in.
chmod 0775 -R ~/public_html