0
votes

I installed vagrant box in mac system. In that vagrant box I configured apache and it is running. I am trying to access it from my machine, but I am not able to access.

*Vagrant.configure(2) do |config|

config.vm.box = "oar-team/debian8"

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

config.vm.synced_folder "./", "/vagrant", id: "vagrant-root",

owner: "vagrant",

group: "www-data",

mount_options: ["dmode=777,fmode=777"]

config.ssh.forward_agent = true

config.vm.define "127.0.0.1"

end*

Above one is my vagrant file. I am vagrant up and it is running the vagrant box.

1
What are you trying to access the server? - OneCricketeer
I have hosted my site on vagrant machine. I want to access it from my local - Maharjun M
I understand the question. I asked how you have tried to access the virtual machine. What IP address? - OneCricketeer
I assigned a port for vagrant as 8000. I am accessing with localhost:8000 - Maharjun M
Please show your vagrantfile. Vagrant doesn't port forward by default - OneCricketeer

1 Answers

0
votes

I found the answer finally. After running the vagrant up My site has some set of scripts to run. To run those scripts I need to run vagrant provision. then only it is running the site.