LoginSignup
2
2

More than 5 years have passed since last update.

VagrantfileでApacheのドキュメントルート変更。

Last updated at Posted at 2015-05-27
  • Apacheの.confに書いてあるドキュメントルートを/var/www/publicから/var/wwwへ変更。
  • 変更後Apache再起動。
Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "scotch/box"
  config.vm.network "private_network", ip: "192.168.11.11"
  config.vm.hostname = 'testsite.dev'
  config.vm.synced_folder "./www", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
  config.vm.provision "shell", inline: <<-EOT
        sed -i -e "s%/var/www/public%/var/www%" /etc/apache2/sites-available/000-default.conf
        /etc/init.d/apache2 restart
  EOT
end
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2