I'm having a lot of trouble configuring nginx properly for Drupal 8. Using the Drupal nginx recipe on the official site works well except for opening modal dialogs like the "Place block" dialog. This results in a 200OK response but an ajax error.

Here is a gist with the error.

I know this is an nginx configuration issue as I have a different conf file that doesn't cause this issue. This other configuration doesn't work with Drupal 8's active link javascript due to the way it adds the query parameters. Frustrating!

1 Answer 1


Sometimes writing it down helps to figure things out! The missing bit of configuration needed is fastcgi_param QUERY_STRING $query_string;

With the Drupal nginx recipe but with that line added in the location ~ '\.php$|^/update.php' { block its now working as expected, both the is-active class is added to the active menu link and the "Place block" ajax works properly.

  • Have issued a pull request with the change for the nginx recipe.
    – tanc
    Oct 10, 2016 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.