accessing website from virtual box guest as localhost as if on the host

ageis23

On my host machine (dev pc) is a copy of IIS express hosting a load of sites. Is there a way I can forward localhost:28101 to localhost:28101 on the host.

For example if I visit localhost:28101 within the vm it will work as if it was done on the host.

It just saves me having to reconfiguring the app.

Kinnectus

You've done your dev all wrong if you're testing with "localhost" rather than a named-based virtual host setup where you can create your own (real) dummy domain and you can then configure your guests/LAN machines to point your dummy domain to the webserver IP via the HOSTS or DNS which will mean no matter what machine you use whenever you go to your dummy domain it'll open your app the right way...

An existing answer (How to set-up my webserver properly on my local network?) shows you how to configure the HOSTS file (and if you wanted to use your own internal DNS server - always useful for these scenarios!) to achieve what you want. Note that you have to edit the HOSTS file on each client computer so it knows where to find your domain name.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to access Virtual Box guest localhost website through another guest?

From Dev

Accessing Virtual Box Machines from Host Machine

From Dev

can't ping from mac host to windows guest in virtual box

From Dev

virtual box debian guest with nat & host-only adapters: 'No route to host' when trying to access host from guest

From Dev

Virtual Box guest on different subnet than host

From Dev

How host local files from HOST OS in Apache running on a Virtual Box Guest OS

From Dev

Accessing localhost from virtual machine

From Dev

Accessing VPN host by name from VirtualBox guest

From Dev

GNOME Terminal: Connect via SSH from Ubuntu Desktop 14.04 into Ubuntu Server 14.04 Virtual Box Guest Host

From Dev

403 Forbidden when accessing host OS's localhost on guest VM

From Dev

Sharing a Dropbox folder with Host & Guest OS (Virtual Box)

From Dev

Share the whole home directory between host and guest with Virtual Box

From Dev

Virtual Box Bridged Adapter can't Ping Host < OR > Guest

From Dev

Ubuntu host can't ping guest virtual box Windows 10

From Dev

Accessing other machines on a vagrant/virtual box host only network from within a docker container

From Dev

Accessing VirtualBox localhost from host machine

From Dev

virtual box linux guest dead after host MacOS autoupdate while guest was running

From Dev

I lost connection of virtual box host and guest with host-only adapter

From Dev

Cannot access server on Virtual Box from the host?

From Dev

openSUSE on Virtual Box : Guest Additions

From Dev

Jekyll --watch command not working in shared folder (nfs) Mac host machine using Virtual box Ubuntu guest machine

From Dev

Virtual Box Bridged network w/ Static IP Win7 host Ubuntu Guest

From Dev

How to Create a network connection between host and guest using static ip in Oracle Virtual Box

From Dev

I am trying to share a file between windows 7 (host) and Ubuntu 12.04.4 (guest), using Virtual Box 4.3.12

From Dev

File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)

From Dev

How to create symlink in virtual box 5.0.2, CentOS 7 as guest, Windows 7 as host

From Dev

Elementary OS (Ubuntu), Virtual Box -> Share www data between host and guest

From Dev

How to setup shared folder in Virtual Box with Windows 10 as host and Centos guest

From Dev

How to install PHP5 in Ubuntu 16 Virtual Box guest on Windows 10 host?

Related Related

  1. 1

    How to access Virtual Box guest localhost website through another guest?

  2. 2

    Accessing Virtual Box Machines from Host Machine

  3. 3

    can't ping from mac host to windows guest in virtual box

  4. 4

    virtual box debian guest with nat & host-only adapters: 'No route to host' when trying to access host from guest

  5. 5

    Virtual Box guest on different subnet than host

  6. 6

    How host local files from HOST OS in Apache running on a Virtual Box Guest OS

  7. 7

    Accessing localhost from virtual machine

  8. 8

    Accessing VPN host by name from VirtualBox guest

  9. 9

    GNOME Terminal: Connect via SSH from Ubuntu Desktop 14.04 into Ubuntu Server 14.04 Virtual Box Guest Host

  10. 10

    403 Forbidden when accessing host OS's localhost on guest VM

  11. 11

    Sharing a Dropbox folder with Host & Guest OS (Virtual Box)

  12. 12

    Share the whole home directory between host and guest with Virtual Box

  13. 13

    Virtual Box Bridged Adapter can't Ping Host < OR > Guest

  14. 14

    Ubuntu host can't ping guest virtual box Windows 10

  15. 15

    Accessing other machines on a vagrant/virtual box host only network from within a docker container

  16. 16

    Accessing VirtualBox localhost from host machine

  17. 17

    virtual box linux guest dead after host MacOS autoupdate while guest was running

  18. 18

    I lost connection of virtual box host and guest with host-only adapter

  19. 19

    Cannot access server on Virtual Box from the host?

  20. 20

    openSUSE on Virtual Box : Guest Additions

  21. 21

    Jekyll --watch command not working in shared folder (nfs) Mac host machine using Virtual box Ubuntu guest machine

  22. 22

    Virtual Box Bridged network w/ Static IP Win7 host Ubuntu Guest

  23. 23

    How to Create a network connection between host and guest using static ip in Oracle Virtual Box

  24. 24

    I am trying to share a file between windows 7 (host) and Ubuntu 12.04.4 (guest), using Virtual Box 4.3.12

  25. 25

    File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)

  26. 26

    How to create symlink in virtual box 5.0.2, CentOS 7 as guest, Windows 7 as host

  27. 27

    Elementary OS (Ubuntu), Virtual Box -> Share www data between host and guest

  28. 28

    How to setup shared folder in Virtual Box with Windows 10 as host and Centos guest

  29. 29

    How to install PHP5 in Ubuntu 16 Virtual Box guest on Windows 10 host?

HotTag

Archive