У меня вот так все работает
config.vm.synced_folder "www", "/var/www
Вот полный файл Vagrant который я использую
Vagrant.configure("2") do |config|
config.vm.define "web" do |web|
#Ubuntu 12.04 LTS 64bit
web.vm.box = "hashicorp/precise64"
#ssh port 4022 => 22
web.vm.network :forwarded_port, id: "ssh", guest: 22, host: 4022
#apache2
web.vm.synced_folder "www", "/var/www"
web.vm.provision "shell", inline: <<-SHELL
export DEBIAN_FRONTEND=noninteractive
mkdir -p /etc/apache2/conf.d/
echo "ServerName localhost" > /etc/apache2/conf.d/servername.conf
apt-get update
apt-get install -y apache2
a2ensite default-ssl
a2enmod ssl
make-ssl-cert generate-default-snakeoil --force-overwrite
service apache2 restart
SHELL
web.vm.network :forwarded_port, guest: 80, host: 4080
web.vm.network :forwarded_port, guest: 443, host: 4443
end
end