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

Nginx Drupal 8 preset is not compatible with robotstxt module #43

Closed
iVegas opened this issue Dec 9, 2019 · 3 comments
Closed

Nginx Drupal 8 preset is not compatible with robotstxt module #43

iVegas opened this issue Dec 9, 2019 · 3 comments

Comments

@iVegas
Copy link

iVegas commented Dec 9, 2019

Steps to reproduce:

  • Up and running Docker4Drupal stack;
  • Installed the latest version of Drupal 8.
  • removed web/robots.txt file;
  • enabled robotstxt module on Drupal 8 installation;
  • go to the /robots.txt page;

Expected results:

  • Status code - 200;
  • Returned default content of robots.txt file provided by robotstxt module;

Actual result:

  • Status code - 404;
  • No result provided. No request redirected to index.php when robots.txt file not exists.
@snowtorious
Copy link

It looks like support for dynamically generated robots.txt file was added with this commit: 81e32d1

Adding the following to a custom site.conf.tmpl file allows Drupal to serve a dynamic robots.txt file:

location = /robots.txt {
    try_files $uri @drupal;
}

Note that this issue also affects the Drupal 7 preset.

@iVegas
Copy link
Author

iVegas commented Jul 30, 2022

The maintainer added support for the WordPress template. Drupal templates (supported versions) need the same configuration.

@csandanov
Copy link
Member

Added robots.txt support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants