vagrant is creating the VM and is running the script, so at this stage feels more a question on apache configuration.
whats the content of the folder /vagrant in the vm? vagrant ssh ls -al /vagrant you need to ensure you have a index.html file that can be served alvaro On Sun, Jul 12, 2020 at 7:45 AM Vivek <aaryavarttechsoluti...@gmail.com> wrote: > I started a ubuntu vm via vagrant. Fine the vagrantfile below. And the > apache.sh(placed inside of a folder named provision) file to provision > apache also follow. > > I get the get the following error after I launch my vm. > > Not Found > The requested URL was not found on this server. > > Apache/2.4.29 (Ubuntu) Server at localhost Port 9080 > > I have seen quite a few posts for this, but could not find a solution so > far. Please help. > > As per this video <https://www.youtube.com/watch?v=kE_pqd34Ib8>, I have > to modify /etc/apache2/apache2.conf, but I am not sure what I should add to > the config for my simple case. > > The Vagrantfile > > # -*- mode: ruby -*- > # vi: set ft=ruby : > > Vagrant.configure("2") do |config| > config.vm.box = "bento/ubuntu-18.04" > > config.vm.synced_folder '.', '/vagrant' > > config.vm.network "forwarded_port", guest: 80, host: 9080 #, host_ip: > "127.0.0.1" > > config.vm.provision "apache", type: "shell", path: > "provision/apache.sh", privileged: true > # vagrant up --provision-with=apache > > end > > Now the apache.sh provisioning file > > #!/usr/bin/env bash > > # sodo is not needed because Vagrant will run the script as root, so there > is no need to actually use sudo. > > # We are announcing to the user > echo "Installing apache ..." > > apt-get update > apt-get install -y apache2 > rm -rf /var/www > ln -fs /vagrant /var/www > > Finally the screen shot of the error that I am getting after launching the > vm with vagrant up command > > [image: TheRequestedUrlNotFound.jpg] > > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/hashicorp/vagrant/issues > Discuss: https://discuss.hashicorp.com/c/vagrant/24 > --- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vagrant-up+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vagrant-up/a21f7aa0-9ac1-412f-9054-a2d322573bc6o%40googlegroups.com > <https://groups.google.com/d/msgid/vagrant-up/a21f7aa0-9ac1-412f-9054-a2d322573bc6o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Alvaro -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/hashicorp/vagrant/issues Discuss: https://discuss.hashicorp.com/c/vagrant/24 --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez3mCELp8kcE2JonBQ3Hy0EazgcMot1h-k55GdMWFvTaQ%40mail.gmail.com.