-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add documentation for additional domains #37
Conversation
@erikhansen Thanks for this, I was just digging into how to go about doing multi-store subdomain setup with warden. |
@erikhansen I can confirm this works. I just tested it. Great work as always my friend. |
Thanks for the contribution @erikhansen! |
@mandatoryhashtags and @molotovbliss If either of you spend time figuring out how to configure Nginx to route specific domains to specific |
@erikhansen What I've done to set those env vars based on domains is add a file at
Then in
This is similar to using |
@davidalger Great, thanks. Want me to submit a PR to add this to the readme? If you don't think it belongs embedded in the readme, I could link to your comment from the readme? |
@davidalger would you say that the And therefore, they must decide whether to manage run codes here, or in the traditional host/vhost configuration for their web services, across environments. |
@vbuck I would consider this production safe. My personal preference is to enforce and specify these codes via an Nginx map in production environments, but I've seen a similar file to the above used successfully in production on some large scale projects for routing of the production names. I have high-traffic projects running an almost near copy of the above for local dev, but utilizing map on production for routing with no issues encountered. As-written the example above should not impact execution unless the switch case matches a host name, falling back to a simple Why I like this for local development use is because it allows configuring the environment for multiple hostnames without requiring a developer to customize Nginx configuration (which in context of Warden, would require mounting a config file into the container, and be more configuration heavy). It's not documented in an issue yet, but Warden 0.2.0 will essentially make inclusion of the
|
Great, thanks for weighing in on it. It makes sense to run it this way, but as an extension to #37 it would still be good to see some documentation about how this could affect/benefit projects in production. |
Quick note: An updated version including all of the above and which is Warden 0.2.0 compliant has been added here: https://docs.warden.dev/configuration/multipledomains.html |
@davidalger , I followed your documentation about multiple domains, but somehow it does not work in my case.
Now I try to handle the requests from the two domains differently in my |
I created this readme based on #14
I didn't explicitly test each of the exact commands that I added, but I believe they should work based on running them for different domains locally.