- Issue created by @2dareis2do
- 🇸🇮Slovenia KlemenDEV
Could be similar to https://www.drupal.org/project/drupal/issues/3368769 🐛 10.1.x breaks Nginx + PHP-FPM with too many redirects even when nginx config is changed Closed: works as designed
- 🇺🇸United States mherchel Gainesville, FL, US
Curious if adding
$settings['file_assets_path'] = 'sites/default/files';
to your settings.php makes any difference (see https://www.drupal.org/node/3328126 → ) - 🇬🇧United Kingdom 2dareis2do
Ok thanks.
I have added that to my settings.php but the behaviour seems to be the same when running nginx. I am not changing the default path.
I have tried manually deleting the js and css directories is sites/default/files/. The curious thing is I cannot actually see where the js is saved on my local, even when apache is serving it? I am expecting it to be saved to sites/default/files/js
Also even when cache warming with apache, nginx cannot seem to see the js file. css is ok.
- 🇬🇧United Kingdom 2dareis2do
Ok what I am seeing is in the browser url is like
https://sl.internal/sites/default/files/js/js_Pvda1doG3ab-fPh6GCiIz9IVaj...
on my local I can see the same is added in both
sites/default/files/js/js_L1Zbm8E81pm2DhGin4yaB92mS40_2F86rsl48qCqjDQ.js
So it looks to me that the css and js are handled differently with the js filename being obfuscated?
- 🇬🇧United Kingdom 2dareis2do
Ok just seen this:
- 🇬🇧United Kingdom 2dareis2do
Ok solution was to edit .env file and run docker compose up -d
new settings:
NGINX_TAG=1.19-5.33.0
NGINX_VHOST_PRESET=drupal10
Now working as expected.
Thanks for your help.
https://github.com/wodby/nginx/commit/f6fcc873849d48f040774d1212e1289b28...
- Assigned to 2dareis2do
- Status changed to Closed: works as designed
over 1 year ago 5:34pm 11 July 2023 - 🇵🇪Peru DevElCuy
For those using wodby/nginx, make sure to include this env vars:
NGINX_BACKEND_HOST=drupal
NGINX_VHOST_PRESET=drupal10
NGINX_SERVER_ROOT=/drupal/path/webBy default the PHP container is "php" as set in NGINX_BACKEND_HOST. Also, if the drupal root folder is /drupal/path, then the nginx server root is the sub-folder: web