Chris Farrugia
Chris Farrugia

Reputation: 1046

Why am I getting error 500 in my Vagrant box?

I'm trying to get Vagrant set up for Laravel development and am trying to use Jeffrey Way's bootstrap.sh (https://raw.githubusercontent.com/JeffreyWay/Vagrant-Setup/master/install.sh) to get my environment set up.

The problem is that after running vagrant up, I go to localhost:8080/ and it tries to redirect to localhost:8080/html and throws an error 500 Internal Server error. Any idea why that would be?

Here is my VagrantFile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

   config.vm.box = "precise32"
   config.vm.box_url = "http://files.vagrantup.com/precise32.box"
   config.vm.network :forwarded_port, guest: 80, host:8080
   config.vm.provision :shell, :path => "bootstrap.sh"

end

Upvotes: 0

Views: 7870

Answers (1)

Rubendob
Rubendob

Reputation: 1694

Recenlty I had the same issue and the problem was, in my case, that Virtual Host was pointing to /vagrant folder and this folder is owned by vagrant.vagrant. I changed Document Root to /var/www/ (default) and this change fix the issue. Review the rights of the folder of the Document Root of your apache. Hope this helps.

Upvotes: 3

Related Questions