Skip to content
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

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

Closed
ericgsmith opened this issue Oct 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ericgsmith
Copy link
Contributor

ericgsmith commented Oct 4, 2023

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

@ericgsmith ericgsmith added the bug Something isn't working label Oct 4, 2023
@ericgsmith ericgsmith changed the title Drupal 10 / Nginx - Compiled assets broken with too many redirects Drupal 10 / Nginx - Compiled assets broken with too many redirects on Drupal 10.1 Oct 4, 2023
ericgsmith pushed a commit to ericgsmith/drupal that referenced this issue Oct 4, 2023
reynoldsalec pushed a commit that referenced this issue Oct 4, 2023
@reynoldsalec
Copy link
Sponsor Member

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

reynoldsalec added a commit to lando/cli that referenced this issue Oct 4, 2023
@reynoldsalec
Copy link
Sponsor Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants