mac 搭建vagrant 本地环境
hosts 文件:
$ sudo vi /private/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
#127.0.0.1 localhost
#255.255.255.255 broadcasthost
#::1 localhost
127.0.0.1 rock.fecshoptest.com
127.0.0.1 my.fecshoptest.com
127.0.0.1 appadmin.fecshoptest.com
127.0.0.1 appfront.fecshoptest.com
127.0.0.1 appfront.fecshoptest.es
127.0.0.1 apphtml5.fecshoptest.com
127.0.0.1 appapi.fecshoptest.com
127.0.0.1 appserver.fecshoptest.com
127.0.0.1 img.fecshoptest.com #appimage/common
127.0.0.1 img2.fecshoptest.com #appimage/appadmin
127.0.0.1 img3.fecshoptest.com #appimage/appfront
127.0.0.1 img4.fecshoptest.com #appimage/apphtml5
127.0.0.1 img5.fecshoptest.com #appimage/appserver
vagrant_fecshop username$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 (guest) => 8080 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
请注意端口是8080