Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordpress Multisite question? #14

Closed
bhansley opened this issue Mar 26, 2018 · 5 comments
Closed

Wordpress Multisite question? #14

bhansley opened this issue Mar 26, 2018 · 5 comments

Comments

@bhansley
Copy link

Slick pacakge! The integration with the proxy container image and how discovery works is very cool. One question as I'm learning this and adapting it to my environment, how do I get this and the auto-proxy to work with Wordpress Multisite (a single WP host serves up multiple domains / subdomains / sites). I might be missing seeing the settings to do that, but is there a way to pass an environment variable that says "this WP container hosts cat.com, dog.org, and fish.edu" and have the proxy configured automatically? Or do I need to ditch multisite and have each WP site hosted in it's own container for this to work?

@evertramos
Copy link
Owner

Thanks for your message @bhansley!

You can update the compose file with the correct multisite wp container and update the DOMAINS option in your .env file, as of:

# Your domain (or domains)
DOMAINS=domain.com,www.domain.com,cat.com,www.cat.com,dog.org,www.dog.org,fish.edu,www.fish.edu

Please let us know if it worked!

@bhansley
Copy link
Author

Thanks, and will do! It may take a day or two, but I'll report back with my results.

@bhansley
Copy link
Author

Yes, that did it! The relevant rows were:

VIRTUAL_HOST: cat.com,www.cat.com,dog.com,www.dog.com,fish.com,www.fish.com
LETSENCRYPT_HOST: cat.com,www.cat.com,dog.com,www.dog.com,fish.com,www.fish.com

I'm still trying to work out one remaining kink where all http traffic isn't being redirected to https (I migrated an existing multisite WP instance over to Docker), but that's a separate problem. Thanks for the help!

It might be worth mentioning in the project docs that this is the solution for doing WP Multisite hosting.

Thanks again!

@evertramos
Copy link
Owner

@bhansley if you set on the .env file you will have it in the docker-compose.yml file, it might be easy.

And regarding the ssl on the wp side, I normally install a ssl plugin to get all routes with ssl enabled, please see these options:

https://wordpress.org/plugins/really-simple-ssl/

or

https://wordpress.org/plugins/ssl-insecure-content-fixer/

Hope it helps!

@bhansley
Copy link
Author

That second one worked perfectly, although I couldn't directly get it to work on the SSL proxied sites - too many redirect errors to actually log in. I installed it on my original site and re-migrated it to the new docker site and all is good. Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants