Created
December 16, 2015 16:40
-
-
Save itsazzad/839d9e7f6d0347e34cfe to your computer and use it in GitHub Desktop.
Vagrantfile used in my Mac which provides dns hostname patterns, variable ip, and all possible changeable folders out of the box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64"#change it? | |
config.vm.box_check_update = false | |
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true | |
config.vm.network "forwarded_port", guest: 443, host: 8443, auto_correct: true | |
# https://github.com/BerlinVagrant/vagrant-dns | |
config.dns.tld = "dev" | |
config.vm.hostname = "hostname"#change it | |
config.dns.patterns = [/^.*hostname.dev$/]#change it | |
config.vm.network "private_network", ip: "192.168.16.22"#change it | |
config.vm.network "public_network", bridge: "en1: Wi-Fi (AirPort)" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.synced_folder "./www", "/var/www", type: "nfs" | |
config.vm.synced_folder "./apache2/etc", "/etc/apache2", type: "nfs" | |
config.vm.synced_folder "./apache2/log", "/var/log/apache2", type: "nfs" | |
config.vm.synced_folder "./apache2/php5", "/etc/php5/apache2", type: "nfs" | |
config.vm.synced_folder "./mysql", "/var/lib/mysql", type: "nfs" | |
end | |
# optional | |
VagrantDNS::Config.logger = Logger.new("dns.log") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment