Daily Usage hosts:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
127.0.0.1 localhost
::1 localhost
192.168.10.11 mail.app
Homestead.yaml
---
ip: "192.168.10.11"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: mail.app
to: /home/vagrant/code/mandrill/public
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
Now I run terminal command "homestead up" after boot "homestead ssh" then when I hit mail.app on my browser it's redirect on my ip.What is the reason of it and how to fix it?
You need to do one of two things:
Add the domain to your hosts file.
Add the project to your Homestead.yaml file
SSH into Homestead
Run the serve mail.app /path/to/projects/public.directory command.
Or
Add the domain to your hosts file.
Add the project to your Homestead.yaml file
Run homestead provision or vagrant provision from your host machine. Depending on whether you have the homestead executable installed.
@Tahsan your configurations look okay but here are two questions that may lead to a solution:
what is inside mandrill folder ( there should be a Laravel project )? and are you running any other local servers on your machine that is using port 80?
@mehany Yup laravel project and I have xampp server.
Try to stop XAMMP/Apache server which is running on port 80. lets see what happens!
when I hit mail.app on my browser it's through 113.11.72.62.It's my IP address.
@Tahsan try this: stop all XAMPP services, shut down the VM from virtual box console, then restart homestead and make sure everything is starting correctly within homestead.
I reinstall it please tell me is that correct?
Isha@TANJEEB ~
$ cd code
Isha@TANJEEB ~/code
$ git clone https://github.com/laravel/homestead.git Homestead
Cloning into 'Homestead'...
remote: Counting objects: 1053, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 1053 (delta 4), reused 0 (delta 0), pack-reused 1036R
Receiving objects: 100% (1053/1053), 159.34 KiB | 100.00 KiB/s, done.
Resolving deltas: 100% (608/608), done.
Checking connectivity... done.
Isha@TANJEEB ~/code
$ cd homestead
Isha@TANJEEB ~/code/homestead (master)
$ bash init.sh
Homestead initialized!
Isha@TANJEEB ~/code/homestead (master)
$ ssh-keygen -t rsa -C "you@homestead "
Generating public/private rsa key pair.
Enter file in which to save the key (/e/home/.ssh/id_rsa):
Created directory '/e/home/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /e/home/.ssh/id_rsa.
Your public key has been saved in /e/home/.ssh/id_rsa.pub.
The key fingerprint is:
2a:22:80:1d:bb:94:5c:99:96:fd:b1:3f:b1:0f:b3:d8 you@homestead
The key's randomart image is:
+--[ RSA 2048]----+
| |
| = |
| . * . . |
|.o * . o |
|o * S . |
|.. . . . o |
|. o . . * |
| . . . o * |
| . E . |
+-----------------+
Isha@TANJEEB ~/code/homestead (master)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
A VirtualBox machine with the name 'homestead' already exists.
Please use another name or delete the machine with the existing
name, and try again.
Isha@TANJEEB ~/code/homestead (master)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: homestead
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 443 => 44300 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if its present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => E:/home/Code/Homestead
default: /home/vagrant/Code => E:/home/Code
==> default: Running provisioner: file...
==> default: Running provisioner: shell...
default: Running: inline script
==> default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdqcgEkUrxRQ2BYZvA6QeQ6QWXGLyad7UENSrxK0XWcr94DqRPICAYfzOr/3Zl7YjZ+XA
STaAuA/oZuqUBjhDBp/Wd7O47/SRSkEM+Lj8r1svz6pRC1Cxx5J0Jb7Yifflkq4aLEywpdHiIYGV1Qvu1h4nLH4a5ZBsyeZH8JZv9ri4CffNUfETNSbPIk7/
rxfv348lYPZPZx8o5p7bQ/trLMte6j1wxLyQvDoXRylc5DmehljnYZFrxwypGaIFJTF7ASJ2XQzxt6l9EM+FWAdIBoPjsGG21rQNZCvJ3NpJaCHZHe3llc6O
TTzG48evI7joga00R74cm6i5A4WYCZ5aN you@homestead
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-1u0srej.sh
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-tespst.sh
==> default: nginx stop/waiting
==> default: nginx start/running, process 1651
==> default: php5-fpm stop/waiting
==> default: php5-fpm start/running, process 1666
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-1mhwhaw.sh
==> default: Warning: Using a password on the command line interface can be insecure.
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-rgxjyd.sh
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-16i2496.sh
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default: php5-fpm stop/waiting
==> default: php5-fpm start/running, process 1762
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Updating to version c6cc6dd6070871f4b198ed39f76dd8047c116b02.
==> default: Downloading: Connecting...
==> default:
==> default: Downloading: 100%
==> default:
==> default:
==> default: Use composer self-update --rollback to return to version c43a39f7334ae3df968cd36a6eff0436bea0da75
==> default: Running provisioner: shell...
default: Running: C:/Users/Isha/AppData/Local/Temp/vagrant-shell20150726-1388-1xlnrjj.sh
Isha@TANJEEB ~/code/homestead (master)
$ alias vm="ssh vagrant@127.0.0.1 -p 2222"
Isha@TANJEEB ~/code/homestead (master)
$ vm
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
ECDSA key fingerprint is 7c:d9:8b:ec:ac:27:b5:f8:2d:2c:ff:e0:11:1e:51:f2.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-24-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Tue Oct 21 14:52:42 2014 from 10.0.2.2
vagrant@homestead :~$
it's running perfectly first time.
@Tahsan looks okay. Next time you start the VM use vagrant up --no-provision
More info on this thread
@ mehany thanks many many thanks.
Please sign in or create an account to participate in this conversation.