문제

I've setup Vagrant in a DO droplet installed a basic LAMP configuration. I'm able to ping the Vagrant IP, so it seems to be running fine, but of course, when accessing the droplet public IP it doesn't serve me the Apache message.

I guess I have to setup some sort of routing so that it points to the guest host, but I have no clue how..

도움이 되었습니까?

해결책

You can use port forwarding inside your Vagrantfile and map port 80 from your host to 80 from your guest:

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

If your apache in your vm doesn't run on port 80, you need of course change the guest port.

BTW: Running vagrant on DigitalOcean doesn't make much sense. Not sure why you need it, but vagrant is designed as a development environment running on local machines.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top