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
Configuration changes may not take place until ddev restart
#4411
Comments
You can If you look at your nginx_full/nginx-site.conf, you'll see that the snippets get loaded last in the
You can also use |
Overall, try something simpler first. For example, try the example in https://ddev.readthedocs.io/en/latest/users/extend/customization-extendibility/#nginx-snippets If it works, (it will), then the problem is with your expectations in that level of the configuration. |
The docs do seem to say that add_header can be used in the server block, However, there are several constraints, the only add_header processed is the last found. But wait... using your example, it adds the header just fine: |
Thanks Randy. I did some more testing with fresh eyes and found two issues:
I see two next steps. The main reason I tried using a snippet was I didn't want to fork the whole config for a one line change. If you fixed the config for drupal 10 or 11, that wouldn't apply, and I don't know if it would be obvious to future team members that the config had been overridden. This is totally a feature request, but I wonder if something like adding a header like Second, does ddev start need to be fixed to reload the nginx config, or removed from the docs? I used it simply because it was first in the list. If it's just a docs change, I can certainly contribute that. If there's a bug in ddev start... possibly, it just depends how my week goes! |
I think what happened is are using mutagen, and in some situations What we should really do is stop saying anything about |
ddev restart
It does in fact say...
|
The web container is not being restarted or recreated. I assumed there was some extra code restarting nginx or similar. I'll file a PR for the docs. On the:
I did do that, but I assumed that message was more about making changes to docker compose files and the like. I think treating ddev start behaviour as undefined when containers are already started is a reasonable way to approach this. |
Is there an existing issue for this?
Run a Diagnostic and Paste Link Here
This passes - as it's including project and client names, if it's truly required let me know and I'll sanitize the logs.
Expected Behavior
Adding a new nginx configuration to
~/.ddev/nginx/storybook.conf
is applied.Actual Behavior
It doesn't appear that nginx snippets are applied at all - even the default one shown in the docs: https://ddev.readthedocs.io/en/stable/users/extend/customization-extendibility/#nginx-snippets
Steps To Reproduce
Note
Using nginx snippets: [/tmp/nginx-test/.ddev/nginx/storybook.conf]
does show in the start logs.Anything else?
I can work around this by editing the full configuration, but for such a simple change I'd rather not. As well, I'm not sure if this directive needs to be in a
location
or not, but if so then I'd expect this to fail completely.The text was updated successfully, but these errors were encountered: