10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrantの共有ファイルシステム

Posted at

VagrantにはゲストOSとホストOS間でファイル(ディレクトリ)を共有する機能がある。
標準ではゲストOS側が/vagrant、ホストOS側がVagrantfileが置いてあるディレクトリとなる。

これはVagrantfileを編集することで変更できる。

Vagrantfile
Vagrant::Config.run do |config|

  config.vm.share_folder "v-root", "/var/www/html", "C:/Users/hoge/Desktop/hoge"
end

ApacheをChefなどでインストールすれば、そのまま第3引数で指定したディレクトリ(上記の例では"C:/Users/hoge/Desktop/hoge")がDocumentRootになってくれるので開発時に便利。

10
10
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
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?