Jeff Geerling’s Blog: Nginx serving up the wrong site content for a Drupal multisite install with https

I had a ‘fun’ and puzzling scenario present itself recently as I finished moving more of my Drupal multisite installations over to HTTPS using Let’s Encrypt certificates. I’ve been running this website—along with six other Drupal 7 sites—on an Nginx installation for years. A few of the multisite installs use bare domains, (e.g. instead of www., and because of that, I have some http redirects on Nginx to make sure people always end up on the canonical domain (e.g. instead of www.

My Nginx configuration is spread across multiple .conf files, e.g.: