I need to be able to access
localhost from host machine (macOS) on Arch server (guest virtualbox machine).
I was able to edit
/etc/hosts to access
localhost on guest machine via IP:port on browser on host. However, the webapp was configured in such a way that only by passing
localhost as the domain will it be able to access all resources on the server.
I turn the Network adapter on Virtualbox to be Bridged Adapter
To illustrate what I meant, :
Host IP: 10.0.0.1/24 Guest IP: 10.0.0.2/24 Default gateway: 10.0.0.24/24
From browser on Host : I can access Guest by typing
10.0.0.2:1234 in browser.
What I want is to be able to type
localhost:1234 in the Host browser and still can access Guest
How may I do that?
Details: Host : macOS Sierra Guest: Arch 4.20.10