I know it's an old question, but the problem is still accurate.
There are some circumstances when you have to run two instances of homestead at the same time. For example when you have app that is works with apache, and one that is freaking out when you enable apache on a server. When you enable it on one website in Vagrant.yaml it will redirect every page that is not using apache to the site that is using it, see example:
- map: presta.shop
to: /home/vagrant/htdocs/presta-shop
type: apache
- map: my.app
to: /home/vagrant/htdocs/my-app
In this situation when you will call my.app homestead will redirect you to presta.shop - because this site is using apache (PrestaShop needs to run under apache). See this link: Github NGINX and Apache conflict #555
My my.app will crash with apache enabled, or I just don't want to enable it on this app, or I just need one extra server just for testing or something. You have to follow those steps from install homestead. After the installation of first server you need to:
- run VirtualBox (or other machine you are using)
- find and rename added homestead box (homestead), to what ever you wish ie:
apache_homestead
- go to homestead dir (cloned from git)
- find file: Homestead.yaml
- in Homestead.yaml add new line after provider with
name
(this is the name of your
renamed box apache_homestead
in this case), and ip
for let say: 192.168.10.11
in this file you can configure many settings, including name
:
ip: "192.168.10.11"
memory: 3072
cpus: 1
provider: virtualbox
name: apache_homestead
After that You may change name of a dir where homestead clone is (default name is homestead). If you rename it to homestead_apache
and run vagrant up
from this directory you will have completely independent server.
To run "normal" server just follow the instructions from install homestead again and run as many servers as You wish :) Run any just go to it homestead
directory and run vagrant up
. Remember the limitation of your host machine!
IMPORTANT NOTE!
You can have all files for all servers in one dir, but every server has it's own database!!. So before you will move application to another server export and import it's database!