Comments (9)
@davidalger looks like I needed to run composer dump-autoload
after adding the new stores.php file to it. All good now! Thanks!
from warden.
@christian-walker Are you making those changes in index.php
or pub/index.php
? Warden uses pub/index.php
as the application entry point on M2 environments. What I would recommend is taking a look at the information here:
The above links show how to handle multi-site setups, and the 2nd one demonstrates how to setup store codes by domain for use on local (without impacting prod, stage, etc).
from warden.
Thanks @davidalger I'll take a look.
from warden.
@davidalger if I use willhen2.test
, do I add it like this in the .env
TRAEFIK_HOST_LIST=app.willhen.test,willhen2.test
or is it like this:
TRAEFIK_HOST_LIST=app.willhen.test,app.willhen2.test
from warden.
@davidalger also for subdomains like this b2b.willhen.test
, would I still have to add app
at the beginning in the browser or would it just be https://b2b.willhen.test
from warden.
@christian-walker The domains can really be whatever you want them to be, no need for app to be there. That's merely the default.
When you set the label traefik.frontend.rule: Host:${TRAEFIK_HOST_LIST}
in the project override file, that label replaces the default one, so whatever you specify there will be routed exactly as you specify it, no magic applied. So you would want TRAEFIK_HOST_LIST=app.willhen.test,app.willhen2.test
in the .env
file to use app sub-domain on the two different domains. If you're wanting to use b2b as the sub-domain, just specify that in the host list instead.
As a general rule, for my own projects here at Mediotype, I actually tend to not use the app sub-domain and do something like site1.client.test and site2.client.test. Use what works best for you.
from warden.
@davidalger thanks, that makes sense. So for my second store I set it up with subdomain b2b.willhen.test
like this:
https://share.getcloudapp.com/jkunnLv5
https://share.getcloudapp.com/WnuEEYpb
https://share.getcloudapp.com/bLuGGAvg
But its still forwarding to the first site b2c.willhen.test
from warden.
@davidalger I've added the stores.php
file and ran composer dump-autoload
after running setup:di:compile
and setup:upgrade
and the site is still forwarding to the main site. Do you have any other suggestions?
from warden.
@christian-walker Afraid not. Don't recall ever encountering an issue in which Magento redirects to the wrong store/website when the codes are properly set and passing to the application in $_SERVER as environment variables. Use of the stores.php file has worked quite reliably for me. I'd see what you can do to see why composer is not loading it (although if it's configured as outlined in the referenced links above, I'm at a loss on that one as well)
from warden.
Related Issues (20)
- Too many networks HOT 1
- DB_DISTRIBUTION and DB_DISTRIBUTION_VERSION are not working? HOT 5
- tunnel reports chmod operation not permitted HOT 6
- Present a warning during `warden env up` if `warden svc up` / `warden install` needs to be re-ran due to an operating system upgrade HOT 1
- Add in-depth ZSH Autocompletion
- [Image] php containers exiting with code (2) HOT 8
- Unable to run integration tests HOT 3
- [Image] Docker not found after sys reboot HOT 2
- [Brew] On linux Warden files for SSL certs created under root user when installed via brew
- warden svc up for first time issue in Linux 20.04
- db containter not working HOT 8
- Feature: Ability to Pipe into `warden shell` HOT 3
- Varnish v7.3 needed by Magento 2.4.6p1 HOT 2
- I can not connect to ssh server HOT 1
- [Command] warden env up does not work on main branch on linux as a result of mutagen sync fixes 3 weeks ago
- [Command] No output when initializing environment HOT 1
- Support on Xdebug with Vscode in Ubuntu HOT 4
- network warden was found but has incorrect label com.docker.compose.network set to "warden" HOT 2
- [Command] Issue in storage Link Laravel
- [Command] warden status Does Not Support Dashes In Env Names HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from warden.