Closed avidsapp closed 4 years ago
I have a ToDo item for this project to extend it and add support for additional virtual hosts.
Reason why I haven't automated this yet (besides lack of time) is that, everyone's additional virtual hosts use will vary. For example, does a person want this virtual hosts file for:
I personally have additional virtual hosts which I use, and would also benefit of implementing this feature. But at this point I just deploy it manually.
Fair enough. I also manually implement additional virtual hosts. I have a few separate use cases. Ideally:
I'm new to Ansible, but I can share as I figure out how to automate these.
Subdomains for the same TLD that use one central db container for multiple wordpress containers. Let's Encrypt for all subdomains
Agreed, this is definitely a case scenario which most of the users would find useful. Same case is with Multiple TLDs with separate wordpress and db containers. Let's Encrypt for all domains.
.
I can do this when I have free time, but I'd definitely encourage you to try this yourself based on what I did with this role and project itself. Just see how I pass changes and how nginx configs are written, then extend it and build on top of that. I'd say to work on "1. subdomains" changes first, as it's relatively simple task.
If you manage to get anything done, please submit a Pull request which I'd be more than happy to review and pull in with master.
Sure thing. I plan to extend when I get time.
I realized the catch-all subdomain doesn't redirect on AWS. Incorporating those Nginx blocks would be first priority.
With latest changes, you're able to create as many subdomains as you want.
For example, as part of deployed docker-compose.yml
file simply extend it to:
DOMAINS: foolcontrol.org -> http://wordpress:80, test.foolcontrol.org -> http://wordpress:80'
This will allow you to add as many subdomains as necessary.
That's great news. Are these subdomains multisite compatible?
Yes, they are. In this case, if you have multisite as part of docker-compose
file, simply point different domain to different wordpress instance.
With this said, I'm going to close this issue. If you have this or similar issue, please submit a new issue or re-open this one.
Any pointers on being able to add more virtual hosts (subdomains) via Ansible?