NGINX_SERVER_NAME directive not working

Hey everyone.

I am running metabase on elastic beanstalk and am trying to get NGINX_SERVER_NAME to work. However, whenever I add that as an environment variable with I can’t connect to metabase at all anymore (health check at /api/health still returns 200). The nginx log shows me the requests are being denied with the a 444 error which results in a 504 error in my browser.

Some more info:

  • I’m also setting NGINX_FORCE_SSL to true
  • I have tried setting the NGINX_SERVER_NAME to either or the elastic beanstalk domain.
  • SSL certificate is set by the loadbalancer
  • DNS (only) is managed by cloudflare

Any suggestions on how I can get this to work? I can see a lot of portscans happening on the instance IP so want to avoid that.

Thanks a lot!

I am getting the same 444 (504 in the browser), but it only happens randomly after like a month of metabase being up. I use the same env vars as you listed here. Unsure how to fix it once it happens too.