2

I know this isn't a unique question, but perhaps the manifesting situation is unique. Answers found elsewhere don't match what I believe are my circumstances.

I have a box hosting a few sites and, although there are no functional issues as far as I can tell, I see this message sprinkled throughout my Nginx error logs for almost every site. Everything I read points to a problem with my FastCGI params, specifically SCRIPT_FILENAME, but my value seems to be inline with what's recommended:

fastcgi_param SCRIPT_FILENAME   $request_filename;

Am I reading the wrong recommendations? I've also noticed that in some cases, but not all, the host value in the log is one whose A record points to the box, but isn't one that Nginx is listening for.

Any idea what might be going on? Is this error "expected" in the case of a 404, maybe?

Rob Wilkerson
  • 1,465
  • 4
  • 17
  • 25

1 Answers1

2

Nope, that's completely out of line. The SCRIPT_FILENAME refers to the path of the file on the filesystem, not the path in the request URI.

Typically it should be something like:

fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Oy. I guess I was definitely reading the wrong recommendations, then. I swear that what I read when I set this up was to _avoid_ using `$document_root$fastcgi_script_name`. Nonetheless: changed. I'll keep an eye on things, but thanks for your help. – Rob Wilkerson Sep 13 '13 at 15:25