README.md 1.4 KB
Newer Older
pierreozoux's avatar
pierreozoux committed
1 2 3 4
## Prerequisites to work on this project:
- [vagrant](http://www.vagrantup.com/)
- [virtualbox](https://www.virtualbox.org/)
- optional: [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)
5
  - run `vagrant plugin install vagrant-hostsupdater` to install
pierreozoux's avatar
pierreozoux committed
6 7

## Get started:
8 9
- Put a TLS certificate (self-signed is fine, but make sure you have [public, intermediate, and private all concatenated into one .pem file](https://www.digitalocean.com/community/tutorials/how-to-implement-ssl-termination-with-haproxy-on-ubuntu-14-04)) in /data/per-user/indiehosters.dev/combined.pem on the host system.
- Test it with `openssl s_server -cert /data/per-user/indiehosters.dev/combined.pem -www`
pierreozoux's avatar
pierreozoux committed
10 11 12 13 14

```bash
vagrant up
```

15
Wait for the provisioning to finish (~40mins), and go to your browser: https://indiehosters.dev
Michiel de Jong's avatar
Michiel de Jong committed
16

17
### If you want to add another wordpress instance apart from indiehosters.dev:
Michiel de Jong's avatar
Michiel de Jong committed
18 19 20 21 22 23
- For e.g. example.dev, put a cert for it in /data/per-user/example.dev/combined.pem on
the host system.
- Test it with `openssl s_server -cert /data/per-user/example.dev/combined.pem -www`

```bash
vagrant ssh
24
sudo sh /data/indiehosters/scripts/approve-user.sh example.dev wordpress
Michiel de Jong's avatar
Michiel de Jong committed
25 26 27 28 29 30
```
Check https://example.dev in your bowser!

### Cleaning up

To clean up stuff from previous runs of your VM, you can do:
pierreozoux's avatar
pierreozoux committed
31 32 33

```bash
vagrant ssh
Michiel de Jong's avatar
Michiel de Jong committed
34
rm -rf /etc/systemd/system/multi-user.wants/*
pierreozoux's avatar
pierreozoux committed
35
```
Michiel de Jong's avatar
Michiel de Jong committed
36
and then restart the VM with `vagrant reload`.