How to access localhost on Virtualbox host machine

Solution 1:

First you should change the Network adapater to Bridged (It seems you are choosing NAT)

enter image description here

Then you can give an ip to your guest machine other than 10.0.2.15 (or you can leave it if you want)

then open a browser from your host machine and type: ip-address-of-your-guest-machine/...