Trellis with Nginx Virtual Hosts on a single Digital Ocean Droplet

Hi,

I’m completely new to Trellis, Sage & Bedrock, but after watching @jlengstorf’s great tutorial on Yotube (for those that haven’t seen it: https://youtu.be/Ls30HGKru8A), I believe this is the fastest WP deployment I’ve seen in my life. So many thanks, @jlengstorf!

Still, I have a question. I have multiple websites pointing to the same Digital Ocean droplet & I’ve configured virtual hosts on Nginx, so that their root directories are pointing to /var/www//html. Is there a configuration file I have to change in order to have deploying work in this case or does Trellis/Nginx just figure it out of the box?

Many thanks for your responses.

Trellis provisions a server for you, so you’re not going to be running/using Trellis on an existing server with vhosts.

You’ll use Trellis to setup the server entirely, including all virtual hosts.

Thanks for your response. I have gained some more understanding into the stack. If I can bug you with a few more questions:

  1. Is an existing server with virtual hosts then a use case where you’d use Bedrock without Trellis or no?

  2. What would be the best way to pick up Roots best practices, any particular part of the documentation/book you can recommend?

I’m just wondering if having all my personal & client websites in one central repository (therefore on a single droplet) is the best idea or just a newbie mistake before I adapt to the new way of thinking. Or is there a way to then push to different production servers?

Thanks,
g

I would be interested in the correct config to setup say a staging server that had multiple hosts on it. that way i would only need one droplet for staging all my projects but the would be deployed to different production servers?

You shouldn’t do this.

You can define multiple WordPress sites if you want multiple projects on one server.

why? Is there any reason why roots.io wouldn’t support this kind of setup?

I would have a canonical host of aaaa.com and redirects for xxx.aaaa.com, yyyy.aaaa.com etc