lando / drupal

The Official Drupal Lando plugin
https://docs.lando.dev/drupal
GNU General Public License v3.0
15 stars 16 forks source link

Drupal 10 / Nginx - Compiled assets broken with too many redirects on Drupal 10.1 #71

Closed ericgsmith closed 10 months ago

ericgsmith commented 11 months ago

When using the drupal10 recipe with nginx and Drupal 10.1 I am unable to access CSS and JS when preprocessing / aggregation is enabled.

Example config:

recipe: drupal10
config:
  via: nginx

This is the same issue that was closed against Drupal core as being down to outdated nginx config https://www.drupal.org/project/drupal/issues/3368769

https://github.com/lando/drupal/blob/main/recipes/drupal10/default.conf.tpl#L57

has

  location @rewrite {
      rewrite ^/(.*)$ /index.php?q=$1;
  }

Where the nginx example config has

  location @rewrite {
      #rewrite ^/(.*)$ /index.php?q=$1; # For Drupal <= 6
      rewrite ^ /index.php; # For Drupal >= 7
  }

I have tested this change locally using config override on the appservice and it fixed the issue I was experiencing.

MR incoming

reynoldsalec commented 11 months ago

Merged the PR and should come out in the next Lando v3.20.x release

reynoldsalec commented 10 months ago

This should now be fixed in Lando 3.20.4, please re-open if it's still a problem @ericgsmith, thanks for the contribution!