![Banner for Drupal NGINX](/_next/image?url=https%3A%2F%2Fcms.valuebound.com%2Fsites%2Fdefault%2Ffiles%2FDrupal8_Nginx.jpg&w=3840&q=75&dpl=dpl_7Nf45ey5wrHjjaEUGL2Us5kqBVSe)
After a couple of hours struggle with Nginx default file to run Drupal 8 production website, we found the solutions for the following problems.
- Image style is not generating in Drupal 8 with Nginx.
- Images are not loading with different image styles like thumbnail, medium, etc
- access denied for the images in Drupal 8 with Nginx
- access denied https://cms.valuebound.com/sites/default/files/styles/thumbnail/public/pictures/ Drupal 8 nginx
Using following default file, we are able to solve all problems addressed above.
And also added couple of tips for following questions,
How to make access rss.xml in Drupal 8 with Nginx?
# RSS Feed. location = /rss.xml { rewrite ^ /index.php?q=rss.xml; }
How to make access sitemap.xml in Drupal 8 with Nginx?
# Sitemap Feed. location = /sitemap.xml { try_files $uri /index.php?q=sitemap.xml; }