This repository provides a better way to install Vagrant w/ ServerPilot. After following the installation instructions, you'll have a server managed by ServerPilot and accessible via your browser at anything-you-want-to
.
You will be able to setup as many domain as you want. And a better, faster stack for developing Magento 2
- Install dependencies
- Virtualbox 5.0 or greater.
- Vagrant 1.8.3 or greater.
- Clone this repository
- Change the settings in settings.yml to fit your needs
- Execute the following commands to setup the virtual machine : (check this before execute commands below)
$ vagrant up
$ vagrant ssh
-
Log in to ServerPilot
-
Go to the Servers page and click + Connect Server
-
Click
I don't have a root password or public IP address
at the bottom -
Copy server-id and server-api-key in the command ServerPilot generated into
settings.yml
-
Note : The part
Testing server configuration
may take several minutes (3-5 minutes based on your Internet connection's moods)
- Go to the Apps (or Servers) page and click + Create App
- Navigate to your application, change to Databases
- Click to +Create Database
- Edit the following file as
administrator
/root
- Linux/Mac OS X :
/etc/hosts
- Windows :
C:\WINDOWS\system32\drivers\etc\hosts
- Linux/Mac OS X :
- Add the following code in this file :
<your-private-ip> anything.domain
- Go to anything.domain in a new tab and you should see the ServerPilot splash page or your application.
The following configuration are not required, but could be useful some day.
Dnsmasq is a very well-known package in *nix world (Mac OS X is Unix, Ubuntu is Linux). It provides network infrastructure for small networks such as DNS, DHCP, router advertisement and network boot. If you need to point a domain to a specified IP address like .dev, .local, .xxx to 127.0.0.1, you will need Dnsmasq!
- Ubuntu tutorials
- Mac OS X tutorials
Are you tired by changing your hosts file all the time? Do you want to config your hosts file once and never touch it again? Then ladies and gentlemen, I present to you: Acrylic DNS - an alternative Dnsmasq for Windows.
- Windows instructions
- Download & install the package you find in the link above for your Windows 7/8/10
- In your Acrylic config file :
- Find
PrimaryServerAddress=8.8.8.8
and replace8.8.8.8
to your primary DNS server you'd like - Find
SecondaryServerAddress=8.8.4.4
and replace8.8.4.4
to your secondary DNS server you'd like
- Find
- In your Acrylic host file :
- Add
<your-private-ip> *.domain
to the end of file (replace .domain to whatever you want such as .local)
- Add
- Access the properties of your Internet connection, then access the properties of the Internet Protocol Version 4 (TCP/IPv4) item
- Select the Use the following DNS server addresses option and set the value of the Preferred DNS server field to 127.0.0.1. Then click on the OK button.
- Purge DNS cache by go to Start Menu\Acrylic DNS Proxy\Config\Purge Acrylic Cache Data
- DONE!
Yes, you can connect to the server using the SFTP method !
- Use your prefered software. I will use
Transmit
. - Login in Transmit with the following credentials :
Host
=><your-private-ip>
User
=>serverpilot
Password
=>The SFTP password that you provided at the beginning of this tutorial
Port
=>22
- You can also login with the
ubuntu
user :Host
=><your-private-ip>
User
=>ubuntu
Password
=>ubuntu
Port
=>22
- But I recommend you to use the
serverpilot
user and not thevagrant
, else you will probably have some permissions issues (i.e : https://serverpilot.io/community/articles/how-to-fix-file-permissions.html)