Access via browser without port in url?

Some websites cannot work when accessing the guest machine from the host if there is a port number in the URL (for example, localhost: 8080). I want to access a website on a guest machine through a browser without a port number in the url, for example, vagrant.localhost.

Is it possible to access the website on the guest machine through a browser without a port in the URL?

+4
source share
1 answer

To do this, you need to forward guest port 80 to host port 80.

, , , Windows, Linux Mac OS X root < 1024.

, :

config.vm.network "forwarded_port", guest: 80, host: 80

vagrant up -, http://localhost. , hosts, 127.0.0.1.

+4

Source: https://habr.com/ru/post/1546517/


All Articles