- Deploy a new Vultr server. I opted for a little single CPU, 512 mb server. It only supports IPv6, hopefully that doesn't become a problem for homebase... We'll find out.
- ssh into the new server. Turns out I needed to specify the interface since it is IPv6. Looked a little something like:
ssh -6 root@xxxxxxxxxxxxxxxxxxxxxxxx
- Next up, install
nvm
so we can install node. At the time of setup, this is the script I used:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
-
Uh oh, it's not installing. Hm, I wonder if this is some IPv6 stuff... Let me deploy a IPv4 server...
-
Works! Ok, boo, I guess I'm spending an extra $2.50 a month ¯_(ツ)_/¯
-
Now with nvm installed, we can install node:
nvm install node
- Next I install homebase!
npm install -g @beaker/homebase
- Ok now daemonize homebase so it keeps on keepin on
# install pm2
npm i -g pm2
# start homebase with pm2
pm2 start homebase
Ok now that homebase is installed and running I want to add apache and php so i can run some alt stuff!!! Gonna base this off https://www.vultr.com/docs/how-to-install-apache-mysql-and-php-on-ubuntu-16-04 but am skipping mysql since I don't need that right now
sudo apt-get update -y
sudo apt-get install apache2 -y
Now here is special part, lets change apache port to be non standard:
In /etc/apache2/ports.conf, change the port as
Listen 8079
Then go to /etc/apache2/sites-enabled/000-default.conf
And change the first line as
<VirtualHost *: 8079>
Now we can start apache:
sudo service apache2 restart
Now we install php
sudo apt-get install php -y
sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,zip} && sudo apt-get install libapache2-mod-php -y
Start apache on boot
sudo systemctl enable apache2.service
restart apache
systemctl restart apache2.service
You can now proxy domains to apache in homebase.yml:
proxies:
- from: proxy.website.com
to: http://localhost:8079
But we need to get virtual hosts working. easiest way is with https://github.com/RoverWire/virtualhost
Now its easy to spin up a new site:
virtualhost create mysite.com
and then update homebase.yml
proxies:
- from: mysite.com
to: http://localhost:8079
The issue here is that script by default sets virtualhost to *:80
so just need to manually edit the .conf file and change to *8079
or just update the script to always create *:8079
I also updated the script to disabled indexes by default:
Options FollowSymLinks