title: Set constant SERVER_NAME with nginx
body: <p>I have <strong>nginx.conf</strong> with following structure:</p>
  
  <pre><code>http {
      [ ... ]
  
      server {
          [ ... ]
  
          location ~ \.php$ {
              fastcgi_pass  unix:/run/php/php7.0-fpm.sock;
              fastcgi_split_path_info  ^(.+\.php)(/.*)$;
              fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
              fastcgi_param  SERVER_NAME $host;
              fastcgi_read_timeout  3000;
              include  fastcgi_params;
          }
      }
  }
  </code></pre>
  
  <p>This nginx runs inside Docker so it has no idea, which domain is linked to it (there is nginx reverse proxy on hosting system). But I have a problem that when I try to acces <code>$_SERVER['SERVER_NAME']</code> from PHP, it's empty... How can I set it to constant value? When I tried:</p>
  
  <pre><code>fastcgi_param  SERVER_NAME example.com
  </code></pre>
  
  <p>it's still empty.</p>
  
  <p>Please note that I have to use <code>SERVER_NAME</code>, because it's in 3rd part code.</p>